Skip to content

feat(skill): add agents skills from ~/.agents/skills#2890

Merged
tusharmath merged 2 commits intomainfrom
common-skills
Apr 8, 2026
Merged

feat(skill): add agents skills from ~/.agents/skills#2890
tusharmath merged 2 commits intomainfrom
common-skills

Conversation

@tusharmath
Copy link
Copy Markdown
Collaborator

@tusharmath tusharmath commented Apr 8, 2026

Summary

Add support for loading skills from ~/.agents/skills/, enabling interoperability with the common agents ecosystem alongside Forge's existing skill sources.

Context

Forge already supports built-in skills, global skills (~/forge/skills/), and project-local skills (.forge/skills/). This change adds a fourth source — ~/.agents/skills/ — which is the standard directory used by common agent tools. This allows users who maintain skills in that directory to have them automatically available in Forge without any additional configuration.

Changes

  • Added agents_skills_path() method to Environment that returns ~/.agents/skills (returns None when home directory is unavailable)
  • Updated SkillRepository to load skills from ~/.agents/skills/ after global skills but before project-local skills
  • Updated render_skill to support a {{agents_skills_path}} template variable in skill command content
  • Updated skill precedence documentation to reflect the new 4-tier order

Key Implementation Details

The new precedence order is: CWD (project-local) > Agents (~/.agents/skills) > Global (~/forge/skills) > Built-in. Skills with duplicate names are resolved by keeping the last occurrence (higher precedence wins). Loading agents skills is gracefully skipped when no home directory is available (None path).

Testing

# Run domain and repo tests
cargo insta test --accept -p forge_domain -p forge_repo

# Manually verify: place a skill in ~/.agents/skills/<skill-name>/SKILL.md
# and confirm it loads in Forge

@github-actions github-actions bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Apr 8, 2026
@tusharmath tusharmath enabled auto-merge (squash) April 8, 2026 13:19
@tusharmath tusharmath merged commit bc20689 into main Apr 8, 2026
8 checks passed
@tusharmath tusharmath deleted the common-skills branch April 8, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant