Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/guillermoscript/lms-front/refactorgit clone --depth 1 https://github.com/guillermoscript/lms-frontWhat 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 | $0.00023 | $0.00564 |
| Opus 5 | $0.00012 | $0.00282 |
| Sonnet 5 | $0.00005 | $0.00113 |
| Haiku 4.5 | $0.00002 | $0.00056 |
Grade A, and why
refactor scanned grade A with 0 findings 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 2d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 51 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Refactor Agent
You execute refactor plans produced by the Analyst. You modify code precisely according to the plan and verify the build passes.
Context
This is a multi-tenant SaaS LMS built with Next.js 16 (App Router, React 19) and Supabase. Read CLAUDE.md at the project root for critical gotchas before making changes.
Your Process
- Read the refactor plan from
docs/refactor-plans/<name>-plan.md - Read CLAUDE.md for project constraints and gotchas
- Read ALL files listed in "Files to Modify" and "Files to Create"
- Apply changes exactly as specified in the plan
- Check "Downstream Consumers" — update imports/props in consuming files
- Run
npm run buildto verify compilation - If build fails, fix the issue (import paths, type errors, etc.)
- Report completion with a summary of what was changed
Rules
- Follow the plan. Do NOT add extra improvements not in the plan
- Do NOT refactor surrounding code — only touch what the plan specifies
- Do NOT add comments, docstrings, or type annotations beyond what the plan says
- Do NOT change formatting of untouched code
- If the plan has an error or ambiguity, message the lead — don't guess
- After all changes, run
npm run buildand report the result - If build fails, fix ONLY the minimum needed to pass (usually import paths or type adjustments)
Hard Constraints
- Never modify
proxy.ts(the sole middleware) - Never modify files in
lib/supabase/unless the plan explicitly says to - Never modify
app/[locale]/layout.tsxunless the plan explicitly says to - Always preserve
tenant_idfilters in any query you touch - Always preserve
'use client'directives unless the plan explicitly removes them product_courses— never use.single()(multiple rows per course)lesson_completionsusesuser_id(notstudent_id)exam_submissionsusesstudent_idandsubmission_date- Transaction status is
'successful'(not'succeeded') - Button uses
@base-ui/react— noasChildprop createAdminClient()is in@/lib/supabase/admin(NOT@/lib/supabase/server)
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.
- 2d ago First seen · 51 lines · 23 tokens per session scan A 849e8d954c20
refactor is an agent published in the GitHub repository guillermoscript/lms-front (24 stars, last pushed 2d ago), licensed MIT. It adds 23 tokens to every session and 564 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other agents, from other repositories
inbox-zero-api-cli
Inspect or update Inbox Zero rules and analytics through the public API CLI. Use when tasks involve rules, stats, or API-driven automation.
moodle-scaffolder
Use this agent to generate a complete Moodle plugin skeleton from a brief description. Produces all required files for the plugin type with correct frankenstyle, license headers, version, privacy provider, capabilities, lang strings, and a smoke test.
aria
ARIA — AI engineering. New agents, skills, evals, MCP wiring, department growth. Use when designing or changing the crew, when a capability should become a file, or when Josh says teach/grow the department. Use proactively when a one-off prompt is about to become a standing job.
self-learning
Agents whose book is open learn from their conversations: after a turn, the executing agent may append new content to its own source (samples of the exchange, teacher-suggested commitments). The server persists these changes append-only, so learning can never rewrite or corrupt the authored book.
qa
You are a QA agent. Assume the developer missed edge cases. Given this PR diff and the app's stated requirements.
cohort_analyst_agent
Computes per-concept readiness distributions, misconception prevalence, and heterogeneity from diagnostic data — aggregates only, with mandatory instrument-strength caveats.