AGENT SKILL

self-extend

Use when evolving the agent's own capabilities with a new skill, custom subagent, plugin, hook, MCP server, or project rule.

License 许可
MIT
最近更新
2026-11-15
Stars
★ 0
Forks
1

01 前言 Front Matter

name
self-extend
triggers
[ "user", "model" ]
description
Use when evolving the agent's own capabilities with a new skill, custom subagent, plugin, hook, MCP server, or project rule.

03 SKILL.md 正文

Self-Extension

Overview

Extend Devin CLI's behavior by adding files to the project (./.devin/) or to your global Devin config (~/.config/devin/ on Linux/macOS, %APPDATA%\devin\ on Windows). Most changes are picked up at the next session or skill reload.

What to create for each need

I want to... Create Location Hot-reload
Add a reusable workflow the agent can invoke Skill .devin/skills/<name>/SKILL.md (project) or ~/.config/devin/skills/<name>/SKILL.md (global) next skill list / session
Define a specialized worker for a task type Custom subagent profile .devin/agents/<name>.md or .devin/agents/<name>/AGENT.md (project/global ~/.config/devin/agents/) next session
Add always-on context for a project or globally Rules .devin/global_rules.md or .devin/rules/*.md (project); ~/.config/devin/AGENTS.md (global) session start
Run custom logic at lifecycle events Hooks .devin/hooks.v1.json or .devin/hooks.json next session
Give the agent new API/database tools MCP server .devin/mcp_config.json or ~/.config/devin/mcp_config.json next session
Bundle skills/rules/hooks/MCP for distribution Plugin .devin-plugin/plugin.json manifest + skills/rules/hooks/mcp install/reload

Creating skills

Before writing any skill or rule, invoke writing-for-agents to ensure the document follows agent-readable conventions (frontmatter, context pointers, completion criteria, pruning).

Project skill (committed to repo):

---
name: my-skill
description: Use when [specific triggering conditions]
---

# My Skill

## Overview
...

Save as .devin/skills/my-skill/SKILL.md. For personal skills, use ~/.config/devin/skills/my-skill/SKILL.md (or %APPDATA%\devin\skills\my-skill\SKILL.md on Windows).

Skill frontmatter can also set:

  • allowed-tools: restrict which tools the skill can use (e.g. [read, grep, glob, exec])
  • subagent: true: run the skill as a subagent_general subagent
  • agent: <profile>: run the skill as a specific custom subagent
  • model: override the model for this skill (e.g. swe-2-max [free], swe-2-flash-high [free], swe-2-flash-medium [free permanent]) - never use paid models
  • permissions: add permission grants/restrictions (e.g. allow: [Read(src/**)], deny: [exec])
  • triggers: who can invoke it (default [user, model])

Discover with skill list --path . and skill search --path . --keywords "...". Invoke with /my-skill.

Creating custom subagents

Custom subagents are Devin CLI profiles that specialize in a kind of work (e.g. reviewer, researcher).

Profile definition in .devin/agents/reviewer.md or .devin/agents/reviewer/AGENT.md:

---
name: reviewer
---

You are a careful code reviewer. Read the diff, then report only concrete issues with file paths and line numbers.

Reference the profile in a skill frontmatter:

---
name: review-pr
description: Use when the user asks for a focused PR review.
agent: reviewer
---

Or dispatch directly from a skill:

Run a `subagent_general` or `researcher` subagent (NOT `subagent_explore` when parent is FREE - runs on the CLI default router, possibly PAID) with the reviewer profile, passing the diff and the review checklist.

Adding rules

.devin/global_rules.md and .devin/rules/*.md inside the project are loaded by default. Keep them small; put detailed guidance in skills.

.devin/rules/*.md files can have trigger frontmatter (always_on, manual, model_decision, agent, glob) to load only when relevant.

.devin/global_rules.md is an always-on file inside .devin/.

Adding hooks

Hooks run custom logic at session lifecycle events. Place them in .devin/hooks.v1.json or .devin/hooks.json.

Common events:

Event Use
PreToolUse Inspect or block a tool call
PostToolUse Log or modify tool output
PermissionRequest Auto-allow/deny specific permission patterns
UserPromptSubmit Inject context when the user sends a message
Stop Run cleanup before the agent stops
SessionStart / SessionEnd Setup/teardown

Example .devin/hooks.v1.json:

{
  "hooks": [
    {
      "event": "PreToolUse",
      "matcher": "exec",
      "type": "command",
      "command": "echo 'exec called: {{tool_name}}' >> .devin/audit.log"
    }
  ]
}

Adding MCP servers

MCP servers give the agent new tools. Configure them in .devin/mcp_config.json (project) or ~/.config/devin/mcp_config.json (global):

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": { }
    }
  }
}

For secrets, use .devin/mcp_config.local.json (gitignored).

Packaging as a plugin

A plugin is a directory with a .devin-plugin/plugin.json manifest. It can ship:

  • skills/<name>/SKILL.md
  • .devin/global_rules.md
  • .devin/rules/*.md
  • .devin/agents/<name>.md
  • mcp_config.json
  • hooks.json/hooks.v1.json

Plugins can be installed from a GitHub repo, git URL, or local folder when Devin CLI plugin support is enabled. See the Devin CLI docs for plugin.json format.

Helper scripts

If a skill needs executable helpers, keep them in the skill's scripts/ directory. Use Python for cross-platform work, Bash for one-off shell integration, or JavaScript if the helper is tool-specific. Document dependencies and exit codes.

Constraints

  • Do not ask users for secrets; put credentials in .devin/config.local.json or env vars.
  • Do not modify repository security policies or CI compliance settings.
  • Keep .devin/global_rules.md small; prefer skills for detailed guidance.
  • Prefer standard Devin CLI paths; do not reference non-Devin runtimes.

Dynamic Subagent Construction (AOrchestra 4-tuple)

Any subagent can be described as a 4-tuple: ⟨Instruction, Context, Tools, Model⟩. The 7 fixed profiles (architect, debugger, implementer, researcher, reviewer, subagent_explore [PAID - não usar quando parent FREE], subagent_general) are pre-configured 4-tuples. For task-specific specialization, override individual tuple elements instead of creating a new profile:

Element What it controls When to override
Instruction What the subagent must accomplish Task needs a specific goal not covered by any profile
Context Task-relevant working memory Task needs scoped context (filter out irrelevant files/history)
Tools Actions the subagent can take Task needs restricted tool access (e.g., read-only exploration)
Model Which LLM executes Cost-performance trade-off (cheaper model for simple subtasks)

How to apply: When dispatching via run_subagent, specify task (instruction), profile (defaults for context/tools/model), and override with task-specific constraints in the task text. The 7 profiles remain as backward-compatible defaults.

Source: AOrchestra (ICML 2026, arXiv:2602.03786). "Sub-agents should be treated as recipes created at runtime, not fixed roles." Training-free mode: 16.28% relative improvement over baselines. SFT mode: +11.51% pass@1 on GAIA (requires 2K trajectories).

Cross-skills

  • Use ai-coding-dictionary to align terms like subagent, harness, and context engineering before writing new skills or rules.
  • Use continuous-improvement to validate that the new skill or rule actually improves the bundle, not just adds it.

04 同仓库更多 Skills

Leostruka
Leostruka/devin-bundle

montador-de-ideias

Use when assembling, expanding, or elevating a raw project idea or initial prompt into an ultra-detailed, first-principles dossier and compiled master prompt with journalistic OSINT market research, Tech Lead and Staff Architect justifications, atomic and modular hardening/optimization, and high-impact contact surfaces.

★ 0
Leostruka
Leostruka/devin-bundle

git-github-adaptive-engineering

Use when any task touches git history, GitHub issues/PRs/releases/CI, repo governance, or branch and merge decisions. Runs the Fase Zero situational-awareness battery, picks one of five delivery flows via the adaptive decision engine, and enforces commit/PR information-density standards. Orchestrates the gh, git-workflows, github-actions, pr, and debug/finish skills.

★ 0
Leostruka
Leostruka/devin-bundle

adaptive-agenda-calendar-routine-engine

Use when planning or executing work across hours, days, weeks, or sprints. Turns the calendar into a strict time-blocked agenda (HH:MM-HH:MM blocks carrying a routine profile, expected inputs, and a handoff output artifact), runs the 5-stage cognitive flow (Radar and Hunt -> Triage plus Steve Jobs conception -> workbench manifest -> >=32-cycle loop -> Close plus Open-Minded Scrum), and unfolds macro calendar milestones into micro agenda blocks through extensions/gcal/wrapper.py.

★ 0
Leostruka
Leostruka/devin-bundle

demo

Use when demonstrating a skill in a fixture project.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0
Leostruka
Leostruka/devin-bundle

duplicate-skill

Use when testing duplicate skill name detection.

★ 0