agentleFS
andrew-yangyandrew-yangy/gru-ai/.claude/skills/gruai-agents/SKILL.md

gruai-agents

Skill155 starsChanged 9 months agoMITView on GitHub

Scaffold a variable-sized AI agent team into the current project. This replaces the old gruai init CLI command. Before reading any templates, resolve the gruai package root directory. This ensures paths work whether gruai is installed via npm, linked locally, or running from source. All template paths below are relative to $GRUAI_ROOT (e.g., $GRUAI_ROOT/cli/templates/agent-roles/cto.md). Ask the user to choose a team size preset. Present these options: Preset role mappings: The agent count shown (4, 7, 11) includes the CEO who…

The file

Show its rules and text

We split this skill into the rules it gives an agent

23 rules. About 0 are common, 10 are distinctive, and 13 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 13

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before reading any templates, resolve the gruai package root directory.

    line 19
  2. Very specific:

    All template paths below are relative to $GRUAI_ROOT (e.g., $GRUAI_ROOT/cli/templates/agent-roles/cto.md).

    line 25
  3. Distinctive:

    Ask the user to choose a team size preset.

    line 29
  4. Distinctive:

    Custom mode validation: If the user chooses Custom, present the full role list and ask them to enter role IDs as a comma-separated list.

    line 51
  5. Distinctive:

    If validation fails, show the error and re-prompt.

    line 54
  6. Distinctive:

    Only generate names for roles in the selected role ID list.

    line 76
  7. Very specific:

    Write the rendered file to .claude/agents/{firstname-lowercase}-{roleid}.md.

    line 89
  8. Distinctive:

    Only create personality files for agents in the selected team.

    line 91
  9. Very specific:

    Write .claude/agent-registry.json with this structure.

    line 95
  10. Very specific:

    leadAgentId fallback: If the designated lead role for a team is not in the selected team, use the first available member's agent ID as …

    line 137
  11. Very specific:

    memberAgentIds: Only include agent IDs for roles that are actually in the selected team.

    line 139
  12. Very specific:

    Create the .context/ directory structure:

    line 168
  13. Very specific:

    Read $GRUAI_ROOT/cli/templates/vision.md -- replace {{PROJECT_NAME}} -- write to .context/vision.md

    line 170
  14. Very specific:

    Create empty dirs with .gitkeep: .context/directives/, .context/reports/, .context/intel/

    line 172
  15. Very specific:

    Create .context/preferences.md with a starter template

    line 173
  16. Very specific:

    Read $GRUAI_ROOT/cli/templates/backlog.json.template -- write to .context/backlog.json

    line 174
  17. Distinctive:

    Only include agents that were generated in Step 2.

    line 182
  18. Distinctive:

    Write to CLAUDE.md at project root.

    line 184
  19. Very specific:

    Only include agents that were generated in Step 2.

    line 192
  20. Very specific:

    Run /directive my-first-task to start working

    line 199
  21. Very specific:

    Always use the templates in $GRUAI_ROOT/cli/templates/ -- never generate template content from scratch

    line 203
  22. Distinctive:

    If files already exist (e.g., re-running the skill), ask before overwriting

    line 204
  23. Distinctive:

    Only generate agents, personality files, registry entries, and config entries for the roles selected in Step 1

    line 206

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Initialize gruai Agent Team

Scaffold a variable-sized AI agent team into the current project. This replaces the old gruai init CLI command.

What This Does

  1. Prompts the user to choose a team size preset (Starter, Standard, Full, or Custom)
  2. Generates agents with random names for the selected roles
  3. Creates .claude/agents/*.md personality files from role templates
  4. Creates .claude/agent-registry.json (team config -- the game reads this)
  5. Scaffolds .context/ tree (vision, lessons, directives, reports, backlog)
  6. Creates CLAUDE.md project instructions with agent roster
  7. Creates gruai.config.json project config

Instructions

Step 0: Resolve Package Root

Before reading any templates, resolve the gruai package root directory. This ensures paths work whether gruai is installed via npm, linked locally, or running from source.

GRUAI_ROOT="$(bash "$(npm root)/gru-ai/cli/resolve-pkg-root.sh" 2>/dev/null || bash "cli/resolve-pkg-root.sh")"

All template paths below are relative to $GRUAI_ROOT (e.g., $GRUAI_ROOT/cli/templates/agent-roles/cto.md).

Step 1: Choose Team Size

Ask the user to choose a team size preset. Present these options:

Team size presets:

  1) Starter   (4 agents:  CEO + COO, CTO, Full-Stack)
  2) Standard  (7 agents:  CEO + COO, CTO, CPO, Frontend, Backend, Full-Stack, QA)
  3) Full      (11 agents: CEO + all roles including CMO, Design, Data, Content)
  4) Custom    (pick your own roles -- minimum: COO + CTO + 1 builder)

Preset role mappings:

PresetRole IDs included
Starter (4)coo, cto, fullstack
Standard (7)coo, cto, cpo, frontend, backend, fullstack, qa
Full (11)coo, cto, cpo, cmo, frontend, backend, fullstack, data, qa, design, content
CustomUser selects from full role list

The agent count shown (4, 7, 11) includes the CEO who is always present.

Custom mode validation: If the user chooses Custom, present the full role list and ask them to enter role IDs as a comma-separated list. Validate their selection:

  • Required: COO (coo) and CTO (cto) must be included. Reject without them.
  • Minimum 1 builder: At least one non-C-suite role must be included (e.g., fullstack, frontend, backend, data, qa, design, content). Reject if only C-suite roles are selected.
  • If validation fails, show the error and re-prompt.

Store the selected preset name (starter/standard/full/custom) and the resolved list of role IDs for use in subsequent steps.

Step 2: Generate Agent Names

Generate unique random first names for only the selected roles (from Step 1). Pair each with a random last name. The full role reference table:

#Role IDTitleRoleC-SuiteReports ToDomains
1ctoCTOChief Technology OfficeryesceoArchitecture, Security, Code Quality, Tech Intelligence
2cooCOOChief Operating OfficeryesceoPlanning, Casting, Sequencing, Ecosystem Intelligence
3cpoCPOChief Product OfficeryesceoProduct Strategy, UX, Prioritization, Market Intelligence
4cmoCMOChief Marketing OfficeryesceoGrowth, SEO, Positioning, Growth Intelligence
5frontendFEFrontend DevelopernoctoReact, Tailwind, Components, UI
6backendBEBackend DevelopernoctoServer, API, Database, Infra
7fullstackFSFull-Stack EngineernoctoFull-Stack, Cross-Domain
8dataDEData EngineernoctoPipelines, Indexing, State, Parsers
9qaQAQA EngineernoctoTesting, Validation, QA, Edge Cases
10designUXUI/UX DesignernocpoUI Design, UX, Wireframes, Visual Review
11contentCBContent BuildernocmoMDX, Copywriting, SEO Content, Docs

Only generate names for roles in the selected role ID list. Skip roles not in the selection.

The agent ID is the first name lowercased (e.g., "aria"). The agent file is {firstname-lowercase}-{roleid}.md (e.g., aria-cto.md).

For reportsTo, resolve the role ID to the generated agent's ID. E.g., if the CTO agent is named "Aria", then agents reporting to "cto" should have reportsTo: "aria". If the role a builder reports to is not in the selected team, set reportsTo to "ceo" as a fallback. For example, if UX Designer (reports to CPO) is selected but CPO is not, the designer reports to CEO.

Step 3: Create Personality Files

For each selected agent, read the role template from $GRUAI_ROOT/cli/templates/agent-roles/{roleid}.md. Replace these placeholders:

  • {{NAME}} -> full name (e.g., "Aria Chen")
  • {{FIRST_NAME}} -> first name (e.g., "Aria")
  • {{FIRST_NAME_LOWER}} -> lowercase first name (e.g., "aria")

Write the rendered file to .claude/agents/{firstname-lowercase}-{roleid}.md.

Only create personality files for agents in the selected team. Do NOT create files for roles that were not chosen.

Step 4: Create agent-registry.json

Write .claude/agent-registry.json with this structure. Only include agents for selected roles plus the static CEO entry. Add a top-level teamSize field.

{
  "teamSize": "starter",
  "agents": [
    {
      "id": "ceo",
      "name": "CEO",
      "title": "CEO",
      "role": "Chief Executive Officer",
      "description": "Sets direction, reviews proposals, approves work",
      "agentFile": null,
      "reportsTo": null,
      "domains": ["Strategy", "Direction", "Approval"],
      "color": "text-foreground",
      "bgColor": "bg-foreground/10",
      "borderColor": "border-foreground/30",
      "dotColor": "bg-foreground",
      "isCsuite": true
    }
    // ... only agents for selected roles
  ],
  "teams": [
    // ... only teams that have at least one member (see rules below)
  ]
}

teamSize field: Set to the preset name chosen in Step 1: "starter", "standard", "full", or "custom".

Team construction rules:

There are four possible teams. For each team, include it only if at least one of its member roles is in the selected team. If the team has zero members, omit it entirely.

Team IDTeam NameLead RoleMember Roles
engineeringEngineeringCTOcto, backend, data, fullstack
productProductCPOcpo, frontend, design, qa
growthGrowthCMOcmo, content
operationsOperationsCOOcoo

leadAgentId fallback: If the designated lead role for a team is not in the selected team, use the first available member's agent ID as the lead instead.

memberAgentIds: Only include agent IDs for roles that are actually in the selected team. Never include IDs for agents that don't exist in the agents array.

Color map by role:

RolecolorbgColorborderColordotColor
CTOtext-violet-400bg-violet-500/15border-violet-500/40bg-violet-500
COOtext-emerald-400bg-emerald-500/15border-emerald-500/40bg-emerald-500
CPOtext-blue-400bg-blue-500/15border-blue-500/40bg-blue-500
CMOtext-amber-400bg-amber-500/15border-amber-500/40bg-amber-500
FEtext-pink-400bg-pink-500/15border-pink-500/40bg-pink-500
BEtext-teal-400bg-teal-500/15border-teal-500/40bg-teal-500
FStext-indigo-400bg-indigo-500/15border-indigo-500/40bg-indigo-500
DEtext-cyan-400bg-cyan-500/15border-cyan-500/40bg-cyan-500
QAtext-lime-400bg-lime-500/15border-lime-500/40bg-lime-500
UXtext-rose-400bg-rose-500/15border-rose-500/40bg-rose-500
CBtext-orange-400bg-orange-500/15border-orange-500/40bg-orange-500

Team colors (same regardless of team size):

TeamcolorbgColorborderColor
Engineeringtext-violet-400bg-violet-500/10border-violet-500/30
Producttext-blue-400bg-blue-500/10border-blue-500/30
Growthtext-amber-400bg-amber-500/10border-amber-500/30
Operationstext-emerald-400bg-emerald-500/10border-emerald-500/30

Step 5: Scaffold Context Tree

Create the .context/ directory structure:

  1. Read $GRUAI_ROOT/cli/templates/vision.md -- replace {{PROJECT_NAME}} -- write to .context/vision.md
  2. Read $GRUAI_ROOT/cli/templates/lessons.md -- replace {{PROJECT_NAME}} -- write to .context/lessons/index.md
  3. Create empty dirs with .gitkeep: .context/directives/, .context/reports/, .context/intel/
  4. Create .context/preferences.md with a starter template
  5. Read $GRUAI_ROOT/cli/templates/backlog.json.template -- write to .context/backlog.json

Step 6: Create CLAUDE.md

Read $GRUAI_ROOT/cli/templates/CLAUDE.md.template. Replace:

  • {{PROJECT_NAME}} -> user's project name (ask if not obvious from repo)
  • {{AGENT_ROSTER}} -> a markdown table of only the selected agents: | Name | Title | Role |

Only include agents that were generated in Step 2. Do NOT include roles that were not selected.

Write to CLAUDE.md at project root.

Step 7: Create gruai.config.json

Read $GRUAI_ROOT/cli/templates/gruai.config.json.template. Replace:

  • {{PROJECT_NAME}} -> project name
  • {{AGENTS_JSON}} -> JSON array of [{ "id": "...", "name": "...", "role": "..." }] for only the selected agents

Only include agents that were generated in Step 2. Write to gruai.config.json at project root.

Step 8: Report

Output a summary of what was created, listing the team size preset chosen and all agent names with their roles. Suggest next steps:

  1. Edit .context/vision.md with your project vision
  2. Set preferences in .context/preferences.md
  3. Run /directive my-first-task to start working

Important

  • Always use the templates in $GRUAI_ROOT/cli/templates/ -- never generate template content from scratch
  • If files already exist (e.g., re-running the skill), ask before overwriting
  • The CEO entry in agent-registry.json is always static (id: "ceo", agentFile: null) and is always included regardless of team size
  • Only generate agents, personality files, registry entries, and config entries for the roles selected in Step 1
  • The teamSize field in agent-registry.json must match the preset chosen in Step 1

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.