Ctx convention add

From ActiveMemory/ctx · View interactive version

Ctx convention add is an AI agent skill from the GitHub repository ActiveMemory/ctx. Record a coding convention. Use when a repeated pattern should be codified so all sessions follow it consistently.

How to use this skill

Skill file

Record a coding convention in CONVENTIONS.md.

When to Use

When NOT to Use

Gathering Information

Conventions are simpler than decisions or learnings. You need:

  1. Name: What is the convention called? (e.g., "kebab-case CLI flags")
  2. Rule: What is the rule? One clear sentence.
  3. Section: Where does it belong in CONVENTIONS.md? (e.g., "Naming",

"Output", "Testing")

If the user provides only a description, infer the section from the

topic. Check existing sections in CONVENTIONS.md first to place it

correctly: don't create a new section if an existing one fits.

If the convention overlaps with an existing one, mention it:

*"There's already a naming convention for functions. Want me to add

this alongside it or update the existing one?"*

Execution

ctx convention add "Use kebab-case for all CLI flag names" --section "Naming"
ctx convention add "Use cmd.Printf/cmd.Println for CLI output, never fmt.Printf/fmt.Println" --section "Output"
ctx convention add "Colocate test files with implementation (*_test.go next to *.go)" --section "Testing"

If no --section is provided, the convention is appended to the end

of the file. Prefer specifying a section for organization.

Authority boundary (vs other skills)

This skill records standardized patterns the project follows. It

does not unilaterally promote material from adjacent skills:

decision with rationale is /ctx-decision-add's territory; a

convention requires the pattern to recur and warrant codifying.

Ask before generalizing.

going forward" is a convention; "we got bitten by Y" is a

learning. The user must explicitly say "codify that" before

the cross-promotion happens.

it and ask whether to update or add alongside.

Light compression for clarity is allowed; new facts are not.

Quality Checklist

Before recording, verify:

genuinely needed

Confirm the convention was added.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.