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 1mo 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.
- 1mo ago First seen · 175 lines · 198 tokens per session scan A 5b3819c0b982
setrole is a skill published in the GitHub repository akaghef/M3E (16 stars, last pushed 2d 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.
setrole compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| setroleakaghef/M3E | Skill | 16 | 2d ago | MIT | A | 198 | Claude Code |
| merge-batchdiegosouzapw/OmniRoute | Skill | 91k | yesterday | MIT | A | 46 | Claude Code |
| prowler-commitprowler-cloud/prowler | Skill | 15k | 3d ago | Apache-2.0 | A | 44 | Claude Code, Codex |
| gh-auth-isolationgithub/gh-aw | Skill | 5.7k | today | MIT | A | 20 | Claude Code, Codex |
| comet-githubrpamis/comet | Skill | 3.3k | yesterday | MIT | A | 72 | Claude Code, Codex |
| github-skillzeenie-ai/OpenCompany | Skill | 1.1k | 3d ago | MIT | A | 51 | Claude Code |
| codex-autoresearchleo-lilinxiao/codex-autoresearch | Skill | 3.3k | 11d ago | MIT | A | 39 | Codex |