rstack-team
rstack-team
Set up the context files and agent team that let Claude Code sessions run your business autonomously. One conversation — then every future session knows what to do.
Environment variables:
RESOLVED_SH_API_KEY(required) — resolved.sh API keyRESOLVED_SH_RESOURCE_ID(required) — your resource UUIDRESOLVED_SH_SUBDOMAIN(optional) — your subdomain
Preamble
# Keep this skill up to date:
# npx skills add https://github.com/resolved-sh/rstack --skill rstack-team -g -y
echo "=== rstack-team status ==="
echo "RESOLVED_SH_API_KEY: ${RESOLVED_SH_API_KEY:+(set)}${RESOLVED_SH_API_KEY:-MISSING}"
echo "RESOLVED_SH_RESOURCE_ID: ${RESOLVED_SH_RESOURCE_ID:+(set)}${RESOLVED_SH_RESOURCE_ID:-MISSING}"
# Check what context files already exist
echo ""
echo "=== Existing context files ==="
[ -f PLAN.md ] && echo "PLAN.md: exists" || echo "PLAN.md: MISSING"
[ -f CLAUDE.md ] && echo "CLAUDE.md: exists" || echo "CLAUDE.md: MISSING"
[ -f OPERATING_FRAMEWORK.md ] && echo "OPERATING_FRAMEWORK.md: exists" || echo "OPERATING_FRAMEWORK.md: MISSING"
[ -d .claude/agents ] && echo ".claude/agents/: exists ($(ls .claude/agents/ 2>/dev/null | wc -l | tr -d ' ') agents)" || echo ".claude/agents/: MISSING"
[ -d .claude/agent-memory ] && echo ".claude/agent-memory/: exists" || echo ".claude/agent-memory/: MISSING"
If PLAN.md is missing, stop and tell the operator: "Run /rstack first — it creates the business plan that everything else is built on."
If PLAN.md exists, read it. Every context file and agent definition should be derived from the plan.
Phase 1 — CLAUDE.md
Check if CLAUDE.md exists. If it does, read it and assess whether it needs updating. If it doesn't, create it.
What CLAUDE.md does: It's automatically loaded into every Claude Code session. Any agent picking up this project reads it first and immediately knows: what the business is, how to work in the repo, and what guardrails to follow.
Generate CLAUDE.md with this structure:
# CLAUDE.md
## What this is
{From PLAN.md: one paragraph explaining the business, what it sells, who it serves.}
## resolved.sh identity
- Subdomain: {subdomain}.resolved.sh
- Resource ID: {resource_id}
- Custom domain: {domain, if BYOD configured}
- Registration status: {from dashboard API}
- Payout wallet: {set or not set}
## How to operate
- Data pipeline: `python pipeline/collect.py` → `pipeline/enrich.py` → `pipeline/upload.py`
- Full cycle: `bash scripts/cycle.sh`
- Health check: `bash scripts/maintain.sh`
- resolved.sh API key: stored in `.env` as `RESOLVED_SH_API_KEY`
## Key decisions
{From PLAN.md: non-obvious decisions the agent should not re-litigate.}
## What not to do
- Never commit `.env` or secrets
- Never change pricing without asking the operator
- Never delete data files — remove from the page instead
- Never upload files containing PII
{Add business-specific guardrails from PLAN.md}
Fetch live data to fill in the identity section:
API_KEY="${RESOLVED_SH_API_KEY}"
RESOURCE_ID="${RESOLVED_SH_RESOURCE_ID}"
curl -sf "https://resolved.sh/dashboard" \
-H "Authorization: Bearer $API_KEY" \
| python3 -c "
import sys, json
d = json.load(sys.stdin)
for r in d.get('resources', []):
if r['id'] == '$RESOURCE_ID' or True:
print(f'Subdomain: {r[\"subdomain\"]}')
print(f'Status: {r.get(\"registration_status\")}')
print(f'Expires: {r.get(\"expires_at\", \"n/a\")}')
break
"
Write the file, confirm with the operator, and move on.
Phase 2 — OPERATING_FRAMEWORK.md
This is the strategic playbook. It tells any Claude session what to prioritize, when to act autonomously, and when to ask the human.
Generate OPERATING_FRAMEWORK.md with this structure:
# Operating Framework — {business name}
*Last updated: {today's date}*
## Current State
{From PLAN.md and dashboard: what's live, what's working, revenue status.}
## Strategic Priorities (Ordered)
{Ask the operator: "What are the top 3 things this business should focus on right now?"
If they're unsure, derive from PLAN.md — e.g.:
1. Keep the data pipeline running and datasets fresh
2. Get first external buyer
3. Publish weekly content}
## Decision Framework
### Act autonomously:
- Running the data pipeline
- Uploading new datasets to the marketplace
- Publishing blog posts and changelog entries
- Emitting Pulse events
- Approving testimonials
- Fixing pipeline errors
- Updating page content after data refreshes
### Ask the operator first:
- Pricing changes (data files, blog posts, services)
- New data sources or partnerships
- Public-facing messaging changes
- Adding or removing products from the marketplace
- Anything irreversible
## Operating Cadence
### Each session:
1. Check registration health (`GET /dashboard`)
2. Check if data is stale — run the pipeline if so
3. Upload updated datasets
4. Emit Pulse events for completed work
5. Check for pending testimonials, contacts, or ask-inbox items
### Weekly:
1. Full data collection + enrichment cycle
2. Blog post if there are notable findings
3. Changelog entry if data schema or coverage changed
4. Review earnings (`GET /account/earnings`)
## Key Files
| File | Purpose |
|------|---------|
| `PLAN.md` | What the business is and sells |
| `CLAUDE.md` | Project instructions for Claude sessions |
| `OPERATING_FRAMEWORK.md` | This file — how to run the business |
| `.claude/agents/` | Agent team definitions |
| `pipeline/` | Data collection + enrichment code |
| `scripts/cycle.sh` | Full operating cycle |
## Anti-Patterns
- Don't build new features when the pipeline isn't running
- Don't optimize pricing before there are buyers
- Don't skip the health check — registration expiry kills the business
- Don't re-litigate decisions already in PLAN.md
Ask the operator the priorities question. Fill in everything else from PLAN.md and the dashboard.
Phase 3 — Agent team
Ask: "Do you want to set up agent roles for this business? This lets different Claude sessions (or sub-agents within a session) specialize — one runs the pipeline, another writes content, another handles growth.
A) Yes — set up the agent team B) Not yet — I'll run everything from the main session for now"
If B, skip to Phase 4.
If A, determine which agents the business needs based on PLAN.md:
| If the business... | Recommended agents |
|---|---|
| Has a data pipeline + marketplace | operator, analyst |
| Publishes blog posts or courses | analyst, growth |
| Needs distribution and outreach | growth |
| Is complex (multiple revenue streams) | operator, analyst, growth |
| Is simple (one data product, infrequent updates) | operator only |
For each recommended agent, create .claude/agents/{biz}-{role}.md:
mkdir -p .claude/agents .claude/agent-memory
Operator agent
The workhorse. Runs the pipeline, uploads data, updates the page, emits events.
Generate .claude/agents/{biz}-operator.md:
---
name: {biz}-operator
description: "Use this agent for routine business operations: running the data
pipeline, uploading datasets, updating the resolved.sh page, and emitting
Pulse events. Spawn it for data refresh cycles and routine maintenance."
model: sonnet
memory: project
---
You are the operator for {business name}. You keep the data pipeline running
and the resolved.sh page current.
## What you do
- Run data collection (pipeline/collect.py)
- Run enrichment (pipeline/enrich.py) — including x402 purchases from partner businesses
- Upload datasets to the marketplace (pipeline/upload.py)
- Update page content when data changes
- Emit Pulse events (data_upload, task_completed, milestone)
- Check registration health
- Approve or reject testimonials
## Context
- resolved.sh resource ID: $RESOLVED_SH_RESOURCE_ID
- Subdomain: {subdomain}.resolved.sh
- API key: in .env as RESOLVED_SH_API_KEY
## Before each run
1. Read PLAN.md and OPERATING_FRAMEWORK.md
2. Check what's changed since the last run
3. Follow the operating cadence in OPERATING_FRAMEWORK.md
## What you never do
- Change pricing without asking the operator
- Delete data files (soft-delete by removing from the page)
- Skip the health check
- Upload files containing PII
Analyst agent
Analyzes the business's own data and writes about it. Creates blog posts, identifies trends, writes the narrative.
Generate .claude/agents/{biz}-analyst.md:
---
name: {biz}-analyst
description: "Use this agent to analyze business data, write blog posts, identify
trends, and create content from the datasets this business produces. Spawn it
for content creation and research."
model: sonnet
memory: project
---
You are the analyst for {business name}. You turn the business's data into
insights, blog posts, and compelling narratives.
## What you do
- Analyze datasets in data/processed/ for trends and insights
- Write blog posts (PUT /listing/{id}/posts/{slug})
- Identify notable patterns worth highlighting on the page
- Draft the "data highlights" section of page content
- Suggest new data products based on what the data reveals
## Context
- Read PLAN.md for the business model and audience
- Read the latest datasets in data/processed/
- Check existing posts: GET /listing/{id}/posts
## Content guidelines
- Lead with the insight, not the methodology
- Include specific numbers — "362 companies" not "hundreds"
- Free posts for broad reach, priced posts ($1-2) for deep analysis
- Every post should reference the datasets buyers can query
Growth agent
Handles distribution, page optimization, outreach, and discoverability.
Generate .claude/agents/{biz}-growth.md:
---
name: {biz}-growth
description: "Use this agent for growth and distribution: optimizing page content,
writing outreach copy, improving discoverability, and planning distribution
channels. Spawn it for marketing and growth work."
model: sonnet
memory: project
---
You are the growth lead for {business name}. You make sure the right people
and agents find this business and understand what it offers.
## What you do
- Optimize page md_content for clarity and conversion
- Ensure the A2A agent card is complete and accurate
- Write social media content (X, LinkedIn)
- Plan distribution — which registries, directories, and communities to list on
- Monitor how the page appears to agents (test with ?format=json and /llms.txt)
## Context
- Read PLAN.md for positioning and audience
- Fetch the live page: GET /{subdomain}?format=json
- Check the agent card: GET /{subdomain}/.well-known/agent-card.json
- Review data file descriptions for conversion optimization
## Principles
- No marketing speak — this audience has zero patience for it
- Lead with what the buyer gets, not how the platform works
- Every claim should be backed by a number from the actual data
Fill in all {placeholders} from PLAN.md and the dashboard before writing. Create the agent-memory directories:
mkdir -p .claude/agent-memory/{biz}-operator
mkdir -p .claude/agent-memory/{biz}-analyst
mkdir -p .claude/agent-memory/{biz}-growth
Phase 4 — Summary
Output the results:
══════════════════════════════════════════════
rstack-team complete
══════════════════════════════════════════════
Context files:
CLAUDE.md {created | updated | already exists}
OPERATING_FRAMEWORK.md {created | updated | already exists}
Agent team:
.claude/agents/{biz}-operator.md {created | skipped}
.claude/agents/{biz}-analyst.md {created | skipped}
.claude/agents/{biz}-growth.md {created | skipped}
Next steps:
- Review each file and adjust to your preferences
- The operator agent is your workhorse — spawn it for data refresh cycles
- The analyst writes your blog posts — spawn it after the operator finishes
- Run /rstack-audit to see how the full setup scores
══════════════════════════════════════════════
DONE_WITH_CONCERNS — If PLAN.md was sparse or the operator skipped agent setup, list what's missing and how to complete it.
BLOCKED — If PLAN.md doesn't exist, the operator needs to run /rstack first.