mcpField
A
agent-instruction

agent-instruction

github.com/validkeysAgent workflows050 installsUpdated 28w ago
Repository

About agent-instruction

agent-instruction is a skill for managing AI instruction files in monorepos during development, using the installed agent-instruction CLI. It maintains rules and builds or updates CLAUDE.md and AGENTS.md from them.

Key features

  1. 01Add instruction rules
  2. 02Build or update instruction files
  3. 03List rules and their contents
  4. 04Organize rule files by category

Use cases

  1. 01Record recurring development conventions as rules
  2. 02Check existing rules to avoid duplicates
  3. 03Propagate rule configurations to CLAUDE.md and AGENTS.md

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/validkeys/agent-instruction --skill agent-instruction

After installing, type/agent-instructionin Claude Code to confirm it loaded.

Details

From the project README

agent-instruction

Manage AI instruction files in monorepos during development sessions. This skill bridges the gap between discovering best practices during development and codifying them as durable instructions.

Use the agent-instruction CLI to add rules, build instruction files, and list existing rules.

Requires: agent-instruction CLI installed and in PATH (go install github.com/validkeys/agent-instruction@latest)

Commands

add_rule

Add a new instruction rule to a rule file.

agent-instruction add "[rule content]" --title "[title]" --rule="[rule-file]"
  • content (required): The instruction rule text
  • --title (optional): Heading for the rule section
  • --rule (optional): Target rule file name (prompts interactively if omitted)

Examples:

agent-instruction add "Always use table-driven tests in Go" --title="Testing Standards" --rule="testing"
agent-instruction add "Never use global variables" --title="Code Standards"
agent-instruction add "Validate all user input before database queries" --rule="security"
build

Generate or update instruction files (CLAUDE.md, AGENTS.md) from all rule configurations.

agent-instruction build
list

Display all available rule files and their contents.

agent-instruction list [--verbose]
  • --verbose (optional): Show full rule content with formatting

Best Practices

  • Check before adding: Run agent-instruction list --verbose before adding a rule to avoid duplicates.
  • Build after changes: After adding multiple rules, run agent-instruction build to propagate changes to CLAUDE.md and AGENTS.md.
  • Use descriptive titles: Clear, specific titles make rules easy to find later.
  • Group related rules: Use category-named rule files — e.g., testing.json, security.json, golang.json, global.json.
  • When to add rules: When the user says "remember this for next time", when a recurring mistake is found, or when a new standard is established.

Notes

This skill requires the agent-instruction CLI to be installed and available in PATH. The CLI manages rule files in the .agent-instruction/ directory and builds instruction files at the repository root.

Comments

Markdown supported