SKILL.md file containing markdown-formatted instructions that get injected into the conversation context.
Skill Discovery
Loaf discovers skills from three locations, in order of precedence:- Repository skills:
.agents/skills/directory in your project - User data skills:
~/.loaf/skills/ - Global skills:
~/.agents/skills/
Repository Skills Discovery
When running inside a git repository, Loaf searches for.agents/skills/ directories:
- Finds the git repository root (marked by
.gitdirectory) - Searches all directories between the repository root and current working directory
- Looks for
.agents/skills/in each directory - Allows nested skills for monorepos or multi-project setups
Skill File Requirements
- Must be named exactly
SKILL.md(case-sensitive) - Must be in a directory (the directory name becomes the skill name)
- Can be nested up to 6 levels deep from the skills directory
- Directories starting with
.are skipped (except.agents) - Maximum 2,000 skill directories per root directory
Skill File Format
Basic Structure
ASKILL.md file contains markdown content with instructions:
Description Extraction
Loaf automatically extracts a skill description from theSKILL.md content:
- Splits content into paragraphs (separated by blank lines)
- Finds the first non-header, non-code-fence paragraph
- Cleans markdown formatting (bold, inline code, list markers)
- Uses the first 8 words as a preview
Naming Conventions
Skill Names
The skill name is derived from its directory name:- Use lowercase with hyphens:
api-testing,code-review - Be descriptive but concise:
database-migrationsnotdb - Avoid special characters (they’re allowed but less readable)
Case Sensitivity
Skill matching is case-insensitive:- Directory:
API-Testing/→ skill name:API-Testing - User types:
/skill api-testing→ matchesAPI-Testing
Creating a Skill
Choose skill location
Decide where to create your skill:Project-specific (recommended for team workflows):User-specific (for personal workflows):Global (shared across all users):
Skill Content Guidelines
Start with Clear Description
Begin with a concise description (will be used for skill discovery):Use Structured Sections
Organize content with clear headings:Include Executable Examples
Provide working code snippets:Document Tools and Dependencies
List required tools and configurations:Example Skills
Code Review Skill
API Testing Skill
Running Tests
Assertions
Use these matchers:expect(status).toBe(200)- Exact equalityexpect(body).toHaveProperty('id')- Property existsexpect(error).toContain('message')- String containsexpect(array).toHaveLength(5)- Array length
create_users_tableadd_email_to_customersremove_deprecated_fields
Migration Template
Running Migrations
Best Practices
- Always provide down(): Make migrations reversible
- Test rollback: Verify down() works before committing
- One change per migration: Keep migrations focused
- Use transactions: Wrap multiple operations
- Backup data: Before running in production
Column Types
table.increments('id')- Auto-incrementing primary keytable.string('name', 255)- VARCHARtable.text('description')- TEXTtable.integer('count')- INTEGERtable.boolean('active')- BOOLEANtable.timestamps(true, true)- created_at, updated_attable.json('data')- JSON column
Dynamic Content
Use markdown variables (if your project supports them):Troubleshooting
Skill Not Found
Problem:/skill my-skill returns “skill not found”
Solutions:
- Verify file is named exactly
SKILL.md(case-sensitive) - Check skill directory exists
- Restart Loaf to reload skills
- Run
/skillsto list discovered skills
Empty Skill Content
Problem: Skill loads but has no effect Solutions:- Ensure
SKILL.mdis not empty - Check file encoding is UTF-8
- Verify markdown is properly formatted
Skill Not Discovered
Problem: Skill doesn’t appear in/skills list
Solutions:
- Verify you’re in a git repository (for project skills)
- Check directory structure:
.agents/skills/skill-name/SKILL.md - Ensure no typos in directory names
- Check scan depth (max 6 levels deep)
Best Practices
Version control skills with code
Version control skills with code
Keep project skills in This ensures team members share the same workflows.
.agents/skills/ and commit to git:Keep skills focused
Keep skills focused
Each skill should handle one domain or workflow. Split large skills:
deployment/- Deployment procedurestesting/- Testing strategiescode-review/- Review guidelines
Update skills regularly
Update skills regularly
As your project evolves, update skills:
- Add new tools and commands
- Remove deprecated workflows
- Update examples with current code
Document skill dependencies
Document skill dependencies
If a skill requires other skills or tools:
Test skills with real tasks
Test skills with real tasks
After creating a skill, test it:
- Load the skill:
/skill my-skill - Ask Loaf to perform the workflow
- Verify instructions are clear and complete
- Refine based on results