返回文档

Skills Guide

2026-04-12

Skills Guide

Skills are reusable AI capability modules. With a Skill, you can teach Doforu specific development workflows, coding standards, or domain knowledge—without repeating prompts in every conversation.

What Is a Skill

A Skill is essentially a SKILL.md file containing metadata and instruction content. When the Agent detects a matching task, it loads the file via the read_skill tool and injects its content into the current conversation context.

Typical use cases for Skills include:

  • Unified code-review guidelines
  • Framework-specific development workflows (e.g., Next.js, Electron)
  • Internal release checklists
  • Common refactoring or documentation-generation templates

Directory Structure and Search Priority

Doforu searches for Skills in the following locations, in order of priority (first match wins):

1. Project-level (currently opened project)

  • .cursor/skills/
  • .agent/skills/
  • .claude/skills/

2. Global-level (user home directory)

  • ~/.cursor/skills/
  • ~/.claude/skills/
  • ~/.agents/skills/
  • ~/.doforu/skills/

3. Data directory

  • data/skills/ (Doforu internal data directory)

Creating a Skill

Create a subdirectory under any of the Skills directories and place a SKILL.md file inside:

~/.doforu/skills/
└── code-review/
    └── SKILL.md

SKILL.md uses the YAML frontmatter + Markdown format:

---
name: code-review
description: Review code for bugs, performance issues, and style inconsistencies
---

# Code Review Skill

## Checklist

1. Check for unhandled exception paths
2. Check for memory leaks or unreleased resources
3. Verify naming follows team conventions
4. Look for hard-coded magic numbers or strings

## Output Format

- Severity: [Critical] / [Suggestion]
- Location: file path + line number
- Recommendation: provide a runnable code example

Frontmatter Fields

| Field | Description | |-------|-------------| | name | Skill identifier (lowercase with hyphens recommended) | | description | One-line summary shown in the available-skills list | | version | Optional version string | | author | Optional author name | | tags | Optional array of tags |

Claude Code Plugin Pack Compatibility

Doforu is also compatible with the Claude Code plugin-pack structure. If your Skill is distributed as a plugin, the directory layout looks like this:

my-plugin/
├── .claude-plugin/
│   └── marketplace.json    # or plugin.json
└── skills/
    └── my-skill/
        └── SKILL.md

Example marketplace.json:

{
  "skills": ["skills/my-skill"]
}

Security note: paths in the plugin manifest must be relative. Doforu rejects absolute paths and path-traversal attempts.

How to Use in a Conversation

When Doforu detects that a task matches an installed Skill, it automatically loads the Skill content via read_skill. No manual action is required.

To verify which Skills are currently available, check the <available_skills> block in the project's AGENTS.md file:

<available_skills>
  <skill name="code-review">Review code for bugs and style issues</skill>
  <skill name="git-workflow">Standardized Git branching and commit flow</skill>
</available_skills>

If the project has no AGENTS.md, Doforu scans the directories above and lists discovered Skills automatically.

Refreshing the Skill List

The Skill list is cached for 60 seconds to reduce disk-scanning overhead on every conversation. After installing or modifying a Skill, you can force a refresh via:

  • Settings page: Settings → Experiment → click Refresh Skills
  • API endpoint: POST /api/skills/reload

The new or updated Skill takes effect immediately after refreshing.