skills/mattjefferson/agents/create-agents-md

create-agents-md

Installation
SKILL.md

Create AGENTS.md - Code Style Guide Injection

Detect project languages, select matching style guides, and inject them into the host project's AGENTS.md.

Arguments

$ARGUMENTS

  • --remove: Remove the injected code style section from AGENTS.md and exit.
  • Default (no args): Detect languages and inject/update style guides.

Step 1: Handle --remove

If $ARGUMENTS contains --remove:

  1. Select a target file:
    • Use AGENTS.md if it exists.
    • Otherwise, use AGENTS.MD if it exists.
    • Otherwise, report No AGENTS.md/AGENTS.MD found and stop.
  2. Read the selected target file.
  3. Find marker pair:
    • <!-- create-agents-md:code-styleguides:start --> and <!-- create-agents-md:code-styleguides:end -->
  4. If markers are found, remove everything between and including the markers, plus surrounding blank lines.
  5. Write the updated file.
  6. Report: Removed code style guides from {target file}.
  7. Stop.

If no markers are found, report No code style guides found in {target file} and stop.

Step 2: Detect Project Languages

Scan the project root for configuration files to determine which languages are used. Collect all matches because a project can use multiple languages.

Config File Language Guide File
package.json JavaScript javascript.md
tsconfig.json or tsconfig*.json TypeScript typescript.md
pyproject.toml or setup.py or requirements.txt or Pipfile Python python.md
go.mod Go go.md
Cargo.toml Rust rust.md
Package.swift Swift swift.md
CMakeLists.txt or *.cpp/*.cc/*.cxx in src/ C++ cpp.md
*.csproj or *.sln C# csharp.md
*.html in root or src/, or *.css/*.scss in root or src/ HTML/CSS html-css.md

Use fast glob checks and run checks in parallel where possible.

TypeScript refinement:

  • If package.json and any tsconfig*.json are present, include both JavaScript and TypeScript.
  • If package.json exists without TypeScript config, include only JavaScript.

If no languages are detected, ask the user which languages to include:

Question: No language config files detected. Which languages does this project use?
Header: Select Languages
Options:
- JavaScript (Google JavaScript Style Guide)
- TypeScript (Google TypeScript Style Guide)
- Python (Google Python Style Guide)
- Go (Effective Go)
- Rust (Rust Style Guide)
- Swift (Swift API Design Guidelines)
- C++ (Google C++ Style Guide)
- C# (Google C# Style Guide)
- HTML/CSS (Google HTML/CSS Style Guide)
Multi-select: yes

Step 3: Confirm With User

Present detected languages and ask for confirmation before writing:

  • Yes, inject: add general principles plus the detected language guides.
  • Customize: let the user choose the language list.
  • Cancel: stop without changing files.

Suggested prompt:

Question: Detected languages: {list}. Inject these style guides into AGENTS.md?
Header: Confirm Style Guides
Options:
- Yes, inject (Add style guides for detected languages + general principles)
- Customize (Choose languages manually)
- Cancel (Do not modify AGENTS.md)
Multi-select: no

On Customize, run the language picker from Step 2. On Cancel, stop without modifying files.

Step 4: Assemble Style Guide Section

Build the injection content in this order:

  1. Opening marker: <!-- create-agents-md:code-styleguides:start -->
  2. Section header: ## Code Style Guidelines
  3. Note: <!-- Auto-generated by /create-agents-md. Do not edit manually. Re-run to update. -->
  4. Attribution: > Source: [conductor style guides](https://github.com/gemini-cli-extensions/conductor/tree/main/templates/code_styleguides)
  5. Append references/general.md
  6. Append each selected language guide from references/*.md
  7. Closing marker: <!-- create-agents-md:code-styleguides:end -->

Guide location:

  • Primary: skills/create-agents-md/references/ (when running from repo root)
  • Fallback: resolve relative to this skill's directory (references/ adjacent to this SKILL.md)

Step 5: Inject Into AGENTS.md

Target file selection:

  1. Use AGENTS.md if it exists.
  2. Otherwise, use AGENTS.MD if it exists.
  3. Otherwise, create AGENTS.md.

Injection behavior:

  • If the marker pair exists, replace that full marked block with the new assembled content.
  • If markers are missing, append the assembled content to the end of the file with a blank line separator.

If creating a new file, initialize with:

# AGENTS

{assembled style guide content}

Step 6: Ensure CLAUDE.md Exists

After updating AGENTS.md/AGENTS.MD:

  1. Check whether CLAUDE.md exists in the project root.
  2. If CLAUDE.md exists, leave it unchanged.
  3. If CLAUDE.md does not exist, create it with:
@AGENTS.md

Step 7: Report

Output:

## Style Guides Injected

**Languages**: {list}
**File**: {AGENTS.md or AGENTS.MD}
**Guides included**:
- General Code Style Principles
- {Language 1} Style Guide
- {Language 2} Style Guide
- ...

To update: `/create-agents-md`
To remove: `/create-agents-md --remove`
Weekly Installs
1
First Seen
Mar 3, 2026
Installed on
amp1
cline1
opencode1
cursor1
kimi-cli1
codex1