Borrowing it
Nothing to install: this file belongs to akaghef/M3E. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/akaghef/M3E/main/.claude/skills/setrole/SKILL.mdgit clone --depth 1 https://github.com/akaghef/M3EWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/akaghef/m3e/setrole)<a href="https://agentmods.dev/skills/akaghef/m3e/setrole"><img src="https://agentmods.dev/badge/skills/akaghef/m3e/setrole/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/akaghef/m3e/setrole"><img src="https://agentmods.dev/badge/skills/akaghef/m3e/setrole.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00198 | $0.01762 |
| Opus 5.5 | $0.00079 | $0.00705 |
| Sonnet 5.5 | $0.00040 | $0.00352 |
| Haiku 4.5 | $0.00020 | $0.00176 |
Grade A, and why
setrole scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -sf http://localhost:4173/api/maps How it starts
The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.
setrole — Agent Role Initialization
ワークツリーで起動したエージェントが自分の役割を確定し、割り当てタスクを拾うためのスキル。
Usage
/setrole {role}
role を省略した場合は、現在のブランチ名から自動判定する。
ロール定義
| ロール | ブランチ | 担当領域 | ファイルスコープ |
|---|---|---|---|
visual |
dev-visual | UI・描画・CSS・SVG・UX | beta/src/browser/, beta/viewer.css, beta/viewer.html |
data |
dev-data | model・controller・API・永続化 | beta/src/node/, beta/src/shared/ |
data2 |
dev-data2 | data の並列ワーカー | beta/src/node/, beta/src/shared/ |
team |
dev-team | Collaboration・Cloud Sync | beta/src/node/collab.ts, beta/src/node/cloud_sync.ts, beta/src/node/start_viewer.ts (collab部分) |
manage |
dev-beta | CI・運用・文書・統合 | docs/, .claude/, scripts/, AGENTS.md |
実行フロー
Step 1: ロール確定
引数があればそのロールを採用。なければブランチ名からマッピング:
dev-visual → visual
dev-data → data
dev-data2 → data2
dev-team → team
dev-beta → manage
worktree-agent-* → (ブランチ名では判定不可。引数必須)
Worktree 環境での注意: isolation: worktree で起動されたエージェントは
worktree-agent-* ブランチにいる場合がある。この場合はロール引数が必須。
引数なし + 不明ブランチ → エラー停止。
マッピングできなければエラーで停止する(不明なブランチでは作業しない)。
Step 2: ブランチ検証
git branch --show-current
現在のブランチがロールの期待ブランチと一致することを確認する。
Worktree 環境: worktree-agent-* ブランチにいる場合は、ロールの期待ブランチに
チェックアウトし、origin/dev-beta で rebase する:
git fetch origin
git checkout dev-visual 2>/dev/null || git checkout -b dev-visual origin/dev-beta
git rebase origin/dev-beta
通常環境: 一致しない場合はチェックアウトを提案する:
⚠ 現在 dev-beta にいますが、ロール visual のブランチは dev-visual です。
切り替えますか?
Step 3: タスク収集
以下の2箇所からタスクを収集する:
3a. マップの strategy ボードを読む
M3E サーバーが起動中なら:
curl -sf http://localhost:4173/api/maps
Final 確認時だけポートを 38482 に切り替える。
M:(開発)> SYSTEM > DEV >> strategy 配下のノードを走査し、attributes.agent が自分のロール名を含むノードを抽出する。
attributes.status が ready または doing のものを優先表示。
サーバー未起動なら: スキップして Step 3b のみ。
3b. ハンドオフファイルをスキャン
ls docs/tasks/handoff_*.md
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 5d ago First seen · 175 lines · 198 tokens per session scan A 5b3819c0b982
setrole is a skill published in the GitHub repository akaghef/M3E (11 stars, last pushed 5d ago), licensed MIT. It adds 198 tokens to every session and 1,762 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-02.
Other skills, from other repositories
prowler-commit
Creates professional git commits following conventional-commits format. Trigger: When creating commits, after completing code changes, when user asks to commit.
gh-auth-isolation
Safely manage multiple GitHub identities (EMU + personal) in agent workflows.
release-helper
Ensures configuration and code changes are released correctly. Use PROACTIVELY whenever you edit config.json, change any setting, or fix a configuration bug in this project, so the change reaches production.
github-skill
Work with GitHub via the gh CLI — clone repositories, create/list/merge pull requests, create/list issues, and run any other gh command (API calls, workflow runs, releases, repo administration). List operations return parsed JSON.
comet-github
A routing guide for Comet-related GitHub work. It directs requests about pull requests, issues, CI failures, ideas, and fixes to the appropriate review or implementation process.
merge-pr
Merge a pull request with status checks, squash merge, and branch cleanup. Handles worktree contexts.