This is a submission for the GitHub Copilot CLI Challenge

What I Built

autopilot-ctrl is a command-line tool that audits AI-generated social media content before publishing. Think of it as a “quality gate” for your content pipeline.

The Problem

My blog has an autopilot system that automatically generates posts for Twitter, LinkedIn, and Newsletter every time I publish an article. It works great… most of the time. But sometimes the AI produces:

  • 🐦 Generic tweets without hooks
  • πŸ’Ό LinkedIn posts without proper structure
  • πŸ“§ Newsletter intros that reveal too much (or too little)

I needed a way to evaluate quality BEFORE publishing and, if something doesn’t pass, improve it automatically.

The Solution

autopilot-ctrl uses GitHub Copilot CLI to:

  1. Audit content against platform-specific criteria
  2. Assign a quality score (0-10)
  3. Identify specific issues
  4. Generate improved versions of failing content
                               πŸ“Š Audit Results                                
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Platform    β”‚  Score  β”‚  Status   β”‚ Issues                                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Twitter     β”‚ 3.0/10  β”‚ [XX] FAIL β”‚ No hook, missing hashtags               β”‚
β”‚ Linkedin    β”‚ 7.0/10  β”‚ [OK] PASS β”‚ -                                       β”‚
β”‚ Newsletter  β”‚ 8.0/10  β”‚ [OK] PASS β”‚ -                                       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Demo

Available commands:

# Check that Copilot CLI is installed
python -m ctrl check

# Audit content
python -m ctrl audit content.json

# Fix failing content
python -m ctrl fix content.json --apply

Screenshots of the flow:

1. Autopilot-Ctrl Introduction

2. Copilot CLI Verification

3. Sample Content

4. Audit Results

5. Content Improved by Copilot

Source code: github.com/Dalaez/datalaria/autopilot/ctrl

My Experience with GitHub Copilot CLI

πŸš€ How I Used Copilot CLI

The magic of autopilot-ctrl lies in how it integrates Copilot CLI in non-interactive mode:

# auditor.py
result = subprocess.run(
    ['copilot', '-s', '--no-ask-user', '-p', prompt],
    capture_output=True,
    text=True,
    timeout=60,
    encoding='utf-8'
)

Each audit sends a structured prompt to Copilot CLI and parses the natural language response to extract:

  • Numeric score (e.g., “Rating: 7/10”)
  • List of issues (e.g., “No engagement”, “Generic hook”)
  • Improvement suggestions

πŸ’‘ What I Learned

  1. Flag order matters: -p MUST be the last argument
  2. Simple prompts work better: Long, structured prompts in non-interactive mode return empty responses
  3. Copilot responds in natural language: I had to create flexible parsers to extract data from responses like “Rating: 7/10

⚑ The Impact on My Workflow

Before autopilot-ctrl, I manually reviewed every generated post. Now:

  1. git push β†’ Autopilot generates content
  2. python -m ctrl audit generated_content.json β†’ Copilot evaluates
  3. If something fails β†’ python -m ctrl fix generates improvements
  4. Approved content β†’ Gets published automatically

Time saved: ~15 minutes per publication.

πŸ› οΈ Tech Stack

  • Python + Click: CLI framework
  • Rich: Terminal UI with tables and colors
  • GitHub Copilot CLI: AI evaluation engine
  • YAML configs: Customizable prompts per platform

Conclusion

autopilot-ctrl demonstrates that GitHub Copilot CLI isn’t just for generating code. It’s a powerful tool for integrating AI into any pipeline - in this case, content quality evaluation.

If you have a system that generates content automatically, consider adding a “quality gate” with Copilot CLI. Your audience (and your engagement metrics) will thank you.

Questions? Drop them in the comments πŸ‘‡


This post is part of the Autopilot Project series, where I document how I automate content creation and publishing using AI.