Skip to main content

Rules & Skills

AIDK uses two key mechanisms to guide the AI: Rules and Skills. Both reside in the .agent/ directory.

Rules

Rules are .md files in .agent/rules/. The AI reads them before every task to understand project constraints and standards.

Rule Structure

# Rule Name

## Description
Brief description of what this rule enforces.

## Mandatory Guidelines
- Rule 1
- Rule 2

## Correct Example
...

## Incorrect Example
...

Default Rules

RulePriorityDescription
0-force-rule.md0 (highest)Forces the AI to review all rules/skills before starting any task
2-dotenv-environments.md2Environment variable configuration standards using .env files
3-coding-style.md3Coding style rules (file size limits, immutability, etc.)

Priority Order

Rules with lower numbers take precedence. For example, 0-force-rule.md is always applied first.


Skills

Skills are directories in .agent/skills/, each containing at least a SKILL.md file. Skills provide technology-specific or task-specific guidance.

Skill Structure

.agent/skills/
└── my-skill/
├── SKILL.md # Main instructions (required)
├── examples/ # Reference examples (optional)
└── templates/ # File templates (optional)

SKILL.md Frontmatter

---
name: my-skill
description: >
Describe when this skill should be used.
The AI reads this to decide whether to apply the skill.
---

Available Skills

SkillWhen to use
cxl-brainstormingBefore any creative/constructive work
cxl-fastapiBuilding REST APIs with FastAPI
cxl-docusaurus-setupCreating/updating Docusaurus doc sites
cxl-terraformWorking with Terraform/OpenTofu
cxl-ansibleWriting Ansible playbooks
cxl-postgres-patternsSchema design and PostgreSQL queries
cxl-dynamodbDynamoDB data modeling
cxl-aws-architectureDesigning AWS architectures
cxl-security-reviewSecurity review when adding auth/APIs
cxl-pythonPython coding standards
cxl-coding-standardsTypeScript/JavaScript/React standards
cxl-seoSEO optimization
cxl-gitignoreCreate/update .gitignore files

Creating a New Skill

aidk add skill my-new-skill
# Creates: .agent/skills/my-new-skill/SKILL.md

Then edit SKILL.md according to your project's specific needs.


Workflows

Workflows are .md files in .agent/workflows/ that define slash-command-driven processes.

Default Workflows

WorkflowSlash commandDescription
new-requirement.md/new-requirementGenerate docs from requirements to planning
execute-plan.md/execute-planStep-by-step execution of a feature plan
code-review.md/code-reviewCode review before pushing
debug.md/debugRoot cause analysis before code changes
write-tests.md/write-testsWrite tests for a new feature