Skip to content

Commit a390e12

Browse files
hsnice16claude
andcommitted
docs: rename 0.5.0 task to "agent skill" — clarify multi-agent support
`npx skills add` (vercel-labs/skills) targets 45+ agents, not just Claude Code. Reword roadmap entry, README blurb, AGENTS tree comment, and the SessionStart banner accordingly. The optional auto-check hook is the only piece that's still host-specific; task file now lists Claude Code and Codex CLI as the two agents with a SessionStart hook today. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d6f3195 commit a390e12

7 files changed

Lines changed: 76 additions & 72 deletions

File tree

.claude/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"hooks": [
77
{
88
"type": "command",
9-
"command": "printf '\\n📦 Agent Friendly Code — current release: 0.4.0\\n • Read AGENTS.md for conventions, CONTRIBUTING.md for the PR workflow.\\n • Roadmap: 0.5.0 (quick wins — history-aware signals + PR score-diff + Claude Code skill) → 0.6.0 (auto-refresh + smarter matching — webhook rescoring + alternatives v2) → 0.7.0 (maintainer ownership + at-scale discovery — OAuth opt-out + package overlay at scale) → 1.0.0 (production cut — Postgres + at-scale indexing + benchmark harness).\\n • Changelog rule: user-facing capabilities only. Codebase hygiene (CI / linter / tests / CONTRIBUTING) does NOT go in lib/changelog.ts.\\n'"
9+
"command": "printf '\\n📦 Agent Friendly Code — current release: 0.4.0\\n • Read AGENTS.md for conventions, CONTRIBUTING.md for the PR workflow.\\n • Roadmap: 0.5.0 (quick wins — history-aware signals + PR score-diff + agent skill) → 0.6.0 (auto-refresh + smarter matching — webhook rescoring + alternatives v2) → 0.7.0 (maintainer ownership + at-scale discovery — OAuth opt-out + package overlay at scale) → 1.0.0 (production cut — Postgres + at-scale indexing + benchmark harness).\\n • Changelog rule: user-facing capabilities only. Codebase hygiene (CI / linter / tests / CONTRIBUTING) does NOT go in lib/changelog.ts.\\n'"
1010
}
1111
]
1212
}

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ tasks/
9797
0.2.0/ # released — dogfood complete (tests, self-score, row-click)
9898
0.3.0/ # released — embeddable scores + broader coverage (badge, more agents, alternatives, package lookup)
9999
0.4.0/ # released — credible scores + discoverability (docs-cited rationales + agent-specific signals + About/llms.txt/OG)
100-
0.5.0/ # planned — quick wins (history-aware signals + PR score-diff action + Claude Code skill)
100+
0.5.0/ # planned — quick wins (history-aware signals + PR score-diff action + agent skill)
101101
0.6.0/ # planned — auto-refresh + smarter matching (webhook rescoring + alternatives v2)
102102
0.7.0/ # planned — maintainer ownership + at-scale discovery (OAuth opt-out + package overlay at scale)
103103
1.0.0/ # planned — production cut (Postgres + at-scale indexing + benchmark harness)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ See `/roadmap` in the running app or the per-version `tasks/` folders for the fu
172172

173173
Versions are sequenced cheap-first so the highest-impact small additions don't get gated on heavy infra:
174174

175-
- **0.5.0 — quick wins**: history-aware signals (maintenance recency, commit velocity, contributor activity) + a GitHub Action that comments the score delta on every PR + a Claude Code skill (with public `/api/score` lookup) that recommends a model for the active repo. No new infra.
175+
- **0.5.0 — quick wins**: history-aware signals (maintenance recency, commit velocity, contributor activity) + a GitHub Action that comments the score delta on every PR + a portable agent skill (Claude Code / Codex / Cursor / Cline / Copilot / 40+ others, with public `/api/score` lookup) that recommends a model for the active repo. No new infra.
176176
- **0.6.0 — auto-refresh + smarter matching**: webhook-driven rescoring (keep scores fresh on every push) + alternatives via README embeddings (cross-language matches the v0.3.0 SQL heuristic misses).
177177
- **0.7.0 — maintainer ownership + at-scale discovery**: OAuth opt-out / claim flow for maintainers + at-scale package overlay (per-registry leaderboards + userscript that renders the badge inline on npmjs.com / PyPI / crates.io).
178178
- **1.0.0 — production cut**: Postgres migration for concurrent writers + auto-discovered crawl (target 10k repos) + benchmark harness that derives per-model weights from measured agent success. From here on, breaking API changes require a MAJOR bump.

lib/roadmap.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ export const ROADMAP: RoadmapVersion[] = [
2929
summary: "GitHub Action that comments score delta on every PR.",
3030
},
3131
{
32-
title: "Claude Code skill",
33-
taskFile: "tasks/0.5.0/03-claude-code-skill.md",
32+
title: "Agent skill",
33+
taskFile: "tasks/0.5.0/03-agent-skill.md",
3434
summary:
35-
"Skill (installable via npx skills add) that checks the active repo's score and recommends a Claude model. Ships with the /api/score lookup endpoint and a UI integration page with a SessionStart hook snippet.",
35+
"Portable skill (installable via npx skills add into Claude Code, Codex, Cursor, Cline, Copilot, …) that checks the active repo's score and recommends a model. Ships with the /api/score lookup endpoint and a UI integration page with auto-check hook snippets for the agents that support them.",
3636
},
3737
],
3838
},

tasks/0.5.0/03-agent-skill.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# 03 · Agent skill (with public score lookup)
2+
3+
**Status**: planned
4+
5+
## Goal
6+
7+
Ship an agent skill that fetches the active repo's score and recommends a model, plus the public lookup endpoint it depends on and a UI page that explains the integration. Bundled because the endpoint has no other consumer in 0.5.0 and the three pieces only make sense together.
8+
9+
The skill itself is portable — installable via `npx skills add hsnice16/agent-friendly-code`. The [vercel-labs/skills](https://github.com/vercel-labs/skills) CLI supports Claude Code, Codex, Cursor, Cline, Copilot, and 40+ other agents, and writes to the right per-agent directory based on the `--agent` flag.
10+
11+
## Pieces
12+
13+
### 1. Public lookup endpoint
14+
15+
`GET /api/score?host=github&repo=<owner>/<name>`
16+
17+
- 200 with `{ repo, signals, modelScores }` — same shape as `/api/repo/[id]` so consumers share a type.
18+
- 404 with `{ error: "not_indexed" }` when not found — explicit so the skill can branch on it cleanly.
19+
- 400 on malformed `repo`. `host` defaults to `github`.
20+
- Thin wrapper around `getRepoByHostOwnerName` in `lib/db.ts`. No on-demand scoring; no GitHub token usage at request time.
21+
22+
### 2. The skill
23+
24+
```text
25+
skills/
26+
agent-friendly/
27+
SKILL.md
28+
```
29+
30+
Frontmatter (per vercel-labs/skills convention — agent-neutral):
31+
32+
```yaml
33+
---
34+
name: agent-friendly
35+
description: Check the active repo's agent-friendliness score and recommend a model. Use when the user asks "is this repo a mess?", "which model should I use here?", or invokes /agent-friendly.
36+
---
37+
```
38+
39+
Body: instructions for the agent to (a) resolve `owner/name` from the git remote, (b) `GET /api/score` against the deployed instance, (c) on 200, render score + recommended model, (d) on 404, say so plainly and skip the recommendation, (e) on first invocation, surface the auto-check hook snippet so the user can opt into automatic checks (when their agent supports session-start hooks). Score → model mapping lives in this file (high score → frontier model, low score → small/fast model); exact thresholds and model IDs land during implementation. Recommendation is provider-neutral — the same score buckets map to Opus/Sonnet/Haiku, GPT-5/4o-mini, etc.
40+
41+
### 3. UI page
42+
43+
New route (e.g. `/skill` or `/integrations/agents`):
44+
45+
- One-paragraph pitch.
46+
- Install command: `npx skills add hsnice16/agent-friendly-code` (link to the [vercel-labs/skills](https://github.com/vercel-labs/skills) agent list so users know it isn't Claude Code-only).
47+
- Manual invocation: `/agent-friendly` (or whatever invocation the host agent uses).
48+
- Optional auto-check hook snippets — shown for the agents that support session-start hooks today:
49+
- **Claude Code**: `SessionStart` hook in `.claude/settings.json`
50+
- **Codex CLI**: `SessionStart` matcher in `.codex/hooks.json` ([docs](https://developers.openai.com/codex/hooks))
51+
- **Cursor / Cline / others**: no session-start hook event yet — the skill itself fires when the user mentions the repo, or they can paste the snippet into `.cursorrules` / `.clinerules` as a static instruction.
52+
- Linked from the homepage and added to `lib/roadmap.ts`.
53+
54+
The hook snippets on the UI page and the skill's first-invocation nudge must stay in sync — same content, multiple surfaces.
55+
56+
## Acceptance
57+
58+
- `GET /api/score?host=github&repo=owner/name` returns the documented shape; 404 body distinguishes `not_indexed` from generic errors.
59+
- `npx skills add hsnice16/agent-friendly-code` installs into the right per-agent directory (`.claude/skills/agent-friendly/`, `.codex/skills/agent-friendly/`, `.cursor/skills/agent-friendly/`, …).
60+
- `/agent-friendly` in a session inside a git repo prints the score + model recommendation, or a clean "not indexed" message.
61+
- UI page is reachable from the homepage; install command + hook snippets match the skill's output, and the page makes clear which agents support the auto-check hook today.
62+
- README gains a short "Public API" section pointing skill / hook authors at `/api/score`.
63+
64+
## Out of scope
65+
66+
- On-demand scoring of unindexed repos.
67+
- Programmatic model switching. The skill recommends; the user runs `/model` (or their agent's equivalent) themselves.
68+
- Per-agent forks of the skill body. One `SKILL.md` for all agents; only the optional hook snippet differs by host.

tasks/0.5.0/03-claude-code-skill.md

Lines changed: 0 additions & 64 deletions
This file was deleted.

tasks/0.5.0/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
**Status**: planned
44

5-
The cheapest items on the roadmap, paired so they can ship in one cut. History-aware signals extend the existing host-API clients with ~3 new signal files; the PR-diff GitHub Action is a thin wrapper that calls the badge / API endpoints we already ship; the Claude Code skill bundles a small lookup endpoint, a `SKILL.md` shipped from this repo, and a UI integration page. No new infra, no new deps of consequence — high-impact additions that don't need a heavy release.
5+
The cheapest items on the roadmap, paired so they can ship in one cut. History-aware signals extend the existing host-API clients with ~3 new signal files; the PR-diff GitHub Action is a thin wrapper that calls the badge / API endpoints we already ship; the agent skill bundles a small lookup endpoint, a portable `SKILL.md` shipped from this repo, and a UI integration page. No new infra, no new deps of consequence — high-impact additions that don't need a heavy release.
66

77
## Tasks
88

99
- [01-history-aware-signals.md](./01-history-aware-signals.md) — extend the scorer with maintenance recency, commit velocity, and contributor activity. Hybrid fetch (shallow clone for files, host API for history) — degrades gracefully without a token.
1010
- [02-score-diff-on-pr.md](./02-score-diff-on-pr.md) — GitHub Action that comments the score delta on every PR using the existing `/api/repo/:id` and `/badge/...svg` endpoints.
11-
- [03-claude-code-skill.md](./03-claude-code-skill.md)Claude Code skill (installable via `npx skills add`) that fetches the active repo's score and recommends a model, bundled with the public `/api/score` lookup endpoint it depends on and a UI integration page with the SessionStart hook snippet.
11+
- [03-agent-skill.md](./03-agent-skill.md)portable agent skill (installable via `npx skills add` into Claude Code, Codex, Cursor, Cline, Copilot, …) that fetches the active repo's score and recommends a model, bundled with the public `/api/score` lookup endpoint it depends on and a UI integration page with auto-check hook snippets for the agents that support them.

0 commit comments

Comments
 (0)