agentleFS
Mingz6Mingz6/copilot-dev-os/skills/flywheel/SKILL.md

flywheel

Skill1 starsChanged 35 days agoMITView on GitHub

Continuous improvement loop. Absorb patterns from watchlist repos, optimize any repo. Use when: '/flywheel', '/flywheel {repo-path}', 'upgrade copilot', 'copilot self-improvement', 'flywheel this repo', '飞轮', 'optimize this repo'.

7 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 9 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 6 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Gather intel: Check data/flywheel-scout/report-*.md for the latest report.

    line 60
  2. Distinctive:

    Verify: Run this checklist — don't skip items:

    line 81
  3. Distinctive:

    Don't invent cleanup work.

    line 97
  4. Distinctive:

    If build fails: stop, show user, ask before continuing.

    line 127
  5. Distinctive:

    Write deferred items in commit body for future runs

    line 134
  6. Distinctive:

    After each run, log the results:

    line 154
  7. Distinctive:

    Don't add a pattern just because it looks cool — it must solve friction you actually hit

    line 175
  8. Distinctive:

    Don't restructure multiple things in one run — one structural change max

    line 176
  9. Distinctive:

    Don't skip verification

    line 177
  10. Distinctive:

    Don't edit shared work repos via flywheel (separate review process)

    line 178

“Common” is measured: kept by at least 6 in 10 of the 6 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Copilot Flywheel — Continuous Improvement (飞轮效应)

Scout the best repos → absorb into your brain → your brain makes your coding better everywhere.

Usage

CommandWhat happens
/flywheelOptimize your copilot config — scout report + apply to instructions/skills/agents/memories
/flywheel {path}Optimize a project repo — scan code + fix issues across 6 dimensions

That's it. Two modes, same command. No sub-commands to remember.

How it works

┌─────────────────────────────────────────────────────────────────┐
│  flywheel_scout worker (automatic, weekly Monday 7am)           │
│  Scans all watchlist repos via GitHub API → LLM analysis        │
│  Writes report to data/flywheel-scout/ + iMessage notification  │
└─────────────────────────────┬───────────────────────────────────┘
                              │
                              ▼
┌─────────────────────────────────────────────────────────────────┐
│  /flywheel (you trigger when ready)                             │
│  1. Check for pending scout report (use it if fresh)            │
│  2. Analyze: what's worth absorbing? what's stale?              │
│  3. Plan: show change table, wait for approval                  │
│  4. Apply: edit files, one logical change at a time             │
│  5. Verify: build/syntax/cross-refs                             │
│  6. Commit + push                                               │
└─────────────────────────────────────────────────────────────────┘

Prerequisites

  • Your copilot config directory (instructions, skills, agents) is git-tracked
  • A flywheel-watchlist.yml file — tracked repos + stack versions
  • flywheel_scout worker (generates weekly reports)
  • flywheel MCP server (optional — used for flywheel_scout tool if available)
  • Git, memory tool

Mode 1: /flywheel — Optimize Brain

Target: your copilot config (instructions, skills, agents, memories)

Flow

  1. Gather intel. Check data/flywheel-scout/report-*.md for the latest report. If fresh (< 7 days), use it. Otherwise, run a live scout (flywheel MCP → GitHub API → LLM analysis).
  2. Inventory. Quick count of instructions/skills/agents/memories. Flag bloat (files > 150 lines, total memory > 500 lines).
  3. Analyze. Compare scout findings against current state. For each candidate:
    • Already covered? → skip
    • Solves real friction? → keep
    • Worth the token cost? → keep only if applies to 3+ future sessions
  4. Plan. Show a change table:

    #ActionTargetWhy
    1UPDATEcsharp.instructions.mdAdd collection expressions pattern
    2TRIMreactjs.instructions.md180→95 lines, drop generic rules
    3DELETEstale-agent.mdNever invoked

    Wait for approval before editing.

  5. Apply. Edit your copilot config. One logical change per write. Stop on failure.
  6. Verify. Run this checklist — don't skip items:
    • YAML frontmatter parses on every changed file
    • Symlinks intact (ls -la ~/.copilot/ still points into brain/copilot/)
    • applyTo globs match real files (find ~/code -name '*.cs' | head -3)
    • Trigger keywords on modified skills — would Copilot match on phrases you actually use?
    • Cross-refs resolve — if renamed/moved anything, grep -r 'old-name' ~/.copilot/ returns empty
    • Memory writes landed (memory view /memories/ spot-check)
    • Git diff shows only intended files (git diff --stat copilot/)
    • Token budget — top-10 instruction line counts didn't balloon
  7. Commit + push. chore: flywheel — {one-line summary}

Memory cleanup (runs as part of step 2)

  • /memories/*.md: delete stale entries, trim files > 150 lines
  • /memories/repo/*.md: delete date-prefixed files older than 14 days
  • Don't invent cleanup work. If everything's healthy, say so.

Mode 2: /flywheel {path} — Optimize a Repo

Target: any project repo in your workspace

Flow

Two phases for quality: scan everything in parallel first, then fix one area at a time.

Phase A — Parallel scan. Spawn 6 read-only subagents (one per area). Each returns findings + recommendations. Areas:

1. structure    — folder layout, README accuracy, build scripts, .gitignore
2. deps         — outdated packages, security advisories, version drift
3. patterns     — code patterns that should be hardened (auth, error handling, config)
4. bugs         — actual defects (data loss, crashes, logic errors)
5. features     — docs/README lagging behind implemented features
6. integration  — cross-repo wiring (mcp.json refs, brain cross-refs, tool names)

Phase B — Serial apply. For each area in order:

  • Triage findings (apply safe high-value items, defer risky ones)
  • Edit files
  • Build/test
  • Commit: {type}: flywheel [{area}] — {summary}
  • Move to next area

If build fails: stop, show user, ask before continuing.

Rules for repo flywheel

  • Top improvements only — don't rewrite the whole repo
  • Match existing architecture and style
  • Each area commits independently (easy to revert one without the others)
  • Write deferred items in commit body for future runs

Watchlist

Your flywheel-watchlist.yml has:

  • Section A (user-managed): repos you trust and learn from
  • Section B (copilot-managed): repos discovered by scout, auto-retired when stale
  • Section C (platforms): where to search for new repos
  • Section D (release feeds): vendor release notes to scan
  • Stack defaults: pinned versions for drift detection

The flywheel_scout worker reads this file weekly and generates the scout report automatically.


Report

After each run, log the results:

# Flywheel — {date} [{target}]

## Changes
| # | Action | Target | Status |
|---|--------|--------|--------|

## Deferred
- {items not applied, with rationale}

## Verification
- Build: {pass/fail}
- Tests: {pass/fail/N/A}

Anti-Patterns

  • Don't add a pattern just because it looks cool — it must solve friction you actually hit
  • Don't restructure multiple things in one run — one structural change max
  • Don't skip verification
  • Don't edit shared work repos via flywheel (separate review process)

Relationships

  • flywheel_scout worker generates the weekly intel automatically
  • flywheel MCP server provides flywheel_scout tool for live scouting
  • /delegate receives larger items that don't fit a single flywheel run
  • Your daily workflow mentions pending scout reports on Mondays

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.