agentsclimarketplace

My agent file conventions

Skill alexleekt/agents/skills/my-agent-file-conventions

AI agent skills and configurations managed by Saddle. Centralized behavioral rules for Claude, OpenCode, Codex, Cursor, Copilot, Gemini, and Pi.

Install
npx -y skills add alexleekt/agents --skill my-agent-file-conventions

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

**ALWAYS use when:** creating, editing, or reviewing AGENT.md or claude.md files. **ALWAYS use when:** deciding what belongs in agent configuration vs project docs. **ALWAYS use when:** the user says "agent file", "agent config", "behavioral rules", "claude.md", "AGENT.md", "what goes in agent files", or "agent guidelines". **DO NOT use for:** tech stack recommendations (@skills/my-tech-stack) or VCS workflows. Defines the boundary: behavioral rules (agent files) vs documentation (README, ARCHITECTURE). Covers file locations, templates, common mistakes, and the "does this belong?" decision tree.

SKILL.md

9.1 KB, as published. Nobody here has run it

Agent File Conventions

⚡ Quick Start

Creating an AGENT.md file:

# Check if agent files already exist
ls -la AGENT.md .agent/claude.md 2>/dev/null || echo "No agent files found"

# Create AGENT.md in project root
cat > AGENT.md << 'EOF'
# Agent Guidelines

## Communication Style
- Be direct and to the point
- Ask clarifying questions when requirements are unclear

## Code Conventions
- Follow existing conventions in the project
- Use TypeScript for all new files

## Workflow Rules
- Always run tests before committing
- Ask before installing new dependencies

## Tool Usage
- Use Edit tool for precise changes
- Prefer grep over manual file reading
EOF

Quick Check - Does this belong in AGENT.md?

  • ✅ Behavioral rules → YES
  • ❌ Project description → NO (use README.md)
  • ❌ Architecture docs → NO (use ARCHITECTURE.md)
  • ❌ Feature specs → NO (use issues/PRs)

Prerequisites

  • Understanding of project structure
  • Knowledge of agent tools available (read, edit, grep, etc.)
  • Familiarity with @skills/my-tech-stack for tech preferences

Overview

Agent configuration files (AGENT.md, claude.md, etc.) define behavioral rules for AI agents — how to work with a project.

Note: This is a living document. Guidelines evolve as workflows change. Check the latest version before making decisions.

What Are Agent Files?

Agent files contain instructions for AI agents, not documentation for humans.

Include: Behavioral Rules

These files should describe:

  • How to approach tasks — workflows, priorities, and methodologies
  • Communication style — how to interact with the user
  • Decision-making rules — what to prioritize or avoid
  • Tool usage patterns — when and how to use specific tools
  • Code conventions — style preferences and patterns to follow
  • Testing requirements — what must be run before committing
  • Approval workflows — when to ask before proceeding

Exclude: Project Documentation

These files should NOT contain:

  • Project descriptions or overviews
  • Architecture documentation
  • Feature specifications
  • Business logic explanations
  • User-facing documentation
  • API documentation
  • Deployment instructions

Quick Check

Behavioral (✓)Documentation (✗)
"Always run tests before committing""This is a React-based dashboard"
"Ask before installing new dependencies""The app uses PostgreSQL for data storage"
"Use TypeScript for all new files""Users can create and manage projects"
"Prefer functional components over classes""The backend exposes a REST API"

The Rule

If it describes what the project is → belongs elsewhere (README, docs/, Architecture.md) If it describes how the agent should behave → belongs here

File Locations

AGENT.md

  • Location: Repository root
  • Scope: Applies to the entire project
  • Use for: Project-wide behavioral rules, coding standards, workflows

claude.md

  • Location: .agent/ directory (e.g., .agent/claude.md)
  • Scope: Applies to specific contexts or subdirectories
  • Use for: Nested rules, specific workflow contexts, subdirectory-specific behaviors
  • Note: Can have multiple claude.md files in different .agent/ directories

Creating Agent Files

AGENT.md Template

# Agent Guidelines

## Communication Style
- Be direct and to the point
- Ask clarifying questions when requirements are unclear
- Always run lint/typecheck commands after making changes

## Code Conventions
- Follow existing code conventions in the project
- Use TypeScript for all new files
- Prefer functional components over classes

## Workflow Rules
- Always run tests before committing
- Ask before installing new dependencies
- Never commit changes unless explicitly asked

## Tool Usage
- When editing files, use the Edit tool for precise changes
- When searching, prefer grep over manual file reading
- Use glob patterns for file discovery

claude.md Template (for specific contexts)

# Agent Guidelines: [Context Name]

## Scope
These rules apply to: `src/frontend/`

## Special Rules
- Use React functional components
- Run `npm run lint` after JS/TS changes
- Always test responsive behavior

Validation Checklist

After modifying any AGENT.md, AGENTS.md, claude.md, or SKILL.md file:

  1. Run agnix validate . — validates Skills, MCP servers, Hooks, Memory, Plugins
  2. If agnix is not installed: brew install agnix (or equivalent)
  3. Fix any errors before committing — warnings are acceptable but review them

This is a mandatory step. Agent configuration files are high-impact — they affect all future agent behavior. Validation catches syntax errors, missing references, and structural issues.

Common Mistakes to Avoid

  1. Writing project documentation in AGENT.md → Move to README.md
  2. Being too vague → Be specific: "Always run X" not "Consider running X"
  3. Forgetting file location rules → AGENT.md in root, claude.md in .agent/
  4. Including feature specs → Those belong in issues or docs/
  5. Not updating when workflows change → Treat as living document
  6. Skipping agnix validation → Always validate after editing agent files

Versioning

  • Last updated: 2024-01-XX
  • Version: 1.0
  • Update notes: Initial conventions

Examples

Good Content

## Git Workflow
ALWAYS run these commands in order before committing:
1. `npm run lint` - Check for style issues
2. `npm run typecheck` - Verify TypeScript
3. `npm test` - Run test suite

Never use `git push --force` on main branch.

Bad Content

## Project Overview
This is a SaaS application for project management.
Built with React and Node.js, it helps teams collaborate.

## Features
- User authentication
- Project creation
- Task management

(The above belongs in README.md, not AGENT.md)

Decision Tree

When deciding what goes in an agent file, ask:

  1. Does this tell the agent HOW to work? → Yes, include it
  2. Does this describe WHAT the project is? → No, put it elsewhere
  3. Is this for AI agent behavior or human understanding? → Only agent behavior belongs here
  4. Would this change if we switched AI agents? → If yes, it's behavioral

Skill Naming Conventions

When creating or naming skill files (SKILL.md), follow these naming patterns:

Personal Skills

Skills that define personal preferences and conventions should be prefixed with my-:

PatternExamplePurpose
my-tech-stackTechnology preferences, tool choicesPersonal technology stack and preferences
my-agent-conventionsAgent behavioral rulesHow agents should behave and work
my-workflowPersonal workflowsCustom workflows and processes

General Skills

Skills that are reusable across projects or users should use descriptive names without the my- prefix:

PatternExamplePurpose
skill-creatorCreating new skillsTool for generating skill files
find-skillsSkill discoveryLocating and listing available skills

Directory Naming

Skill directories should match the skill name:

  • skills/my-tech-stack/SKILL.md → name: my-tech-stack
  • skills/my-agent-conventions/SKILL.md → name: my-agent-conventions

Troubleshooting

IssueSolution
AGENT.md edits not being followedCheck file is in repo root, not a subdirectory
Multiple claude.md files conflictingEnsure scopes don't overlap; use explicit "Scope" headers
Agent ignores workflow rulesVerify rules are behavioral (how), not documentation (what)
claude.md not loading in subdirectoryCheck .agent/ directory exists at that level
Rules feel too vagueReplace "Consider X" with "Always X" or "Never X"

Related Skills

  • @skills/my-tech-stack — For tool recommendations (not agent config)
  • @skills/my-workflow — For commit discipline and worktrunk naming when editing agent files
  • @skills/my-council — For reviewing agent file changes before committing
  • @skills/worktrunk — For managing worktrees when working on agent file updates across branches

Related Files

  • Project overview → README.md
  • Architecture → docs/architecture.md or ARCHITECTURE.md
  • API docs → docs/api.md or inline code comments
  • Feature specs → Issues, PRs, or docs/features/
  • User docs → docs/user/ or separate documentation site

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.