agentleFS
lyoneellyoneel/ly-agent-skills/agents-md-sync/SKILL.md

agents-md-sync

Skill0 starsChanged 2 months agoMITView on GitHub

Audit AGENTS.md files for duplication and correct placement. Use when syncing user-level and project-level AGENTS.md files.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. PrefectHQ/prefect★ 24ksame name
    2. Signet-AI/signetai★ 313same name
    3. thonymg/skills★ 1same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository9 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

12 rules. About 0 are common, 8 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All outputs are suggestions and recommendations only.

    line 26
  2. Very specific:

    Call crush_info first to detect if Crush is active and retrieve context_paths from the running instance.

    line 32
  3. Very specific:

    Run scripts/discover.py with CRUSH_AVAILABLE set based on the crush_info result.

    line 34
  4. Very specific:

    If the questions array is non-empty, use the question tool to ask the user before proceeding.

    line 36
  5. Very specific:

    If user_level is empty, ask:

    line 50
  6. Distinctive:

    If both are empty, ask:

    line 86
  7. Distinctive:

    If the user selects "Create at custom path", follow up with:

    line 104
  8. Distinctive:

    After step 1, compare user-level AGENTS.md against project-level AGENTS.md.

    line 138
  9. Distinctive:

    Check if AGENTS.md contains instructions already defined by enforced skills.

    line 153
  10. Distinctive:

    commit (conventional commits, commit message format)

    line 159
  11. Distinctive:

    After all 3 steps, output a summary:

    line 174
  12. Distinctive:

    When promoting instructions or detecting duplicates, consolidate multiple definitions into a single well-defined instruction.

    line 187

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Initialize todos tool:

{
  "todos": [
    {"content": "Initialize agents-md-sync operation", "status": "in_progress", "active_form": "Initializing agents-md-sync operation"},
    {"content": "Step 1 — Recommend project-level instructions for user-level promotion", "status": "pending", "active_form": "Analyzing project-level instructions for promotion"},
    {"content": "Step 2 — Detect overlaps between user-level and project-level", "status": "pending", "active_form": "Detecting overlaps between user and project levels"},
    {"content": "Step 3 — Find duplicates between AGENTS.md and enforced skills", "status": "pending", "active_form": "Finding duplicates with enforced skills"},
    {"content": "Complete agents-md-sync operation", "status": "pending", "active_form": "Completing agents-md-sync operation"}
  ]
}

Audit AGENTS.md Files

All outputs are suggestions and recommendations only. Never apply changes automatically. The user has final decision on all changes.

BEGIN EXECUTION IMMEDIATELY. Do not ask the user what they want to do. Start with step 1:

Discovery

Call crush_info first to detect if Crush is active and retrieve context_paths from the running instance. The crush.json file may exist without Crush being used — crush_info is the authoritative source.

Run scripts/discover.py with CRUSH_AVAILABLE set based on the crush_info result. The script outputs JSON with user_level, project_level, nonexistent, warnings, and questions fields.

If the questions array is non-empty, use the question tool to ask the user before proceeding. Convert each entry in questions into a free_text question:

{
  "questions": [
    {
      "type": "free_text",
      "question": "AGENTS.md detection needs clarification",
      "description": "<content from discover.py questions array>"
    }
  ]
}

If user_level is empty, ask:

{
  "questions": [
    {
      "type": "single_choice",
      "question": "User-level AGENTS.md not found",
      "description": "Could not locate user-level AGENTS.md. Both files are required for comparison. How should I proceed?",
      "choices": [
        {"id": "create_default", "label": "Create at default path", "description": "Create ~/.config/crush/AGENTS.md"},
        {"id": "custom_path", "label": "Create at custom path", "description": "I will specify the file location"}
      ]
    }
  ]
}

If project_level is empty, ask:

{
  "questions": [
    {
      "type": "single_choice",
      "question": "Project-level AGENTS.md not found",
      "description": "Could not locate project-level AGENTS.md. Both files are required for comparison. How should I proceed?",
      "choices": [
        {"id": "create_default", "label": "Create at default path", "description": "Create <repo_root>/AGENTS.md"},
        {"id": "custom_path", "label": "Create at custom path", "description": "I will specify the file location"}
      ]
    }
  ]
}

If both are empty, ask:

{
  "questions": [
    {
      "type": "single_choice",
      "question": "AGENTS.md files not found",
      "description": "Could not locate user-level or project-level AGENTS.md. Both files are required for comparison. How should I proceed?",
      "choices": [
        {"id": "create_default", "label": "Create at default paths", "description": "Create both files at standard locations"},
        {"id": "custom_paths", "label": "Create at custom paths", "description": "I will specify the file locations"}
      ]
    }
  ]
}

If the user selects "Create at custom path", follow up with:

{
  "questions": [
    {
      "type": "free_text",
      "question": "Custom AGENTS.md path",
      "description": "Enter the full path for the missing AGENTS.md file. The file will be created at this location."
    }
  ]
}

Once all files are in place (found or created), proceed to step 1.

Step 1 — Promote to User Level

Scan the project-level AGENTS.md for instructions that apply globally across all projects.

Recommend moving to user-level AGENTS.md when an instruction:

  • Is a general convention (not project-specific)
  • Would apply to any project the user works on
  • Is a personal preference (writing style, formatting, tooling preferences)

Output a table:

InstructionLocationReason
ExampleAGENTS.md:10General convention, applies to all projects

Step 2 — Detect Overlaps

After step 1, compare user-level AGENTS.md against project-level AGENTS.md.

Recommend removal from project-level when an instruction:

  • Already exists in user-level AGENTS.md (exact or equivalent)
  • Is covered by a user-level rule

Output a table:

Project-level instructionUser-level equivalentAction
ExampleUser AGENTS.md:5Remove from project-level

Step 3 — Duplicate Skill Instructions

Check if AGENTS.md contains instructions already defined by enforced skills.

Enforced skills to cross-reference:

  • gen-skill (skill creation, validation, frontmatter, token limits, references splitting)
  • planner (plan structure, phases, todo tracking)
  • commit (conventional commits, commit message format)

Recommend removal from AGENTS.md when an instruction:

  • Is already defined in the enforced skill
  • Duplicates the skill's documented behavior

Output a table:

AGENTS.md instructionDefined inAction
Example: SKILL.md under 5000 tokensgen-skillRemove from AGENTS.md

Report Format

After all 3 steps, output a summary:

## Summary

Total recommendations: N
  Promote to user-level: N
  Remove from project-level: N
  Remove (duplicated by skill): N

Consolidation Rule

When promoting instructions or detecting duplicates, consolidate multiple definitions into a single well-defined instruction. Do not copy fragmented or repetitive text verbatim. Combine all relevant points into one clear, complete instruction before adding it to user-level AGENTS.md.

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.