Install
$ agentstack add skill-jpbaking-agentic-tests-agentic-refactor ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
Agentic Refactor
The mirror image of agentic-unit-test: there, tests change and code is frozen; here, code changes and tests are frozen. The agent tests are the definition of correct behavior.
3 RULES
- NEVER edit any test — not agent tests, not user tests, not to "fix" a failure. A failing test means YOUR change is wrong.
- Behavior must not change. Refactor = same observable behavior, better internals. If a desired change WOULD alter behavior, STOP and tell the user to use the
agentic-test-updateskill after deciding intentionally. - Work in small steps; every step ends with a fully green suite and a checkpoint commit.
Step 1 — Ask the user
- "What should be refactored/optimized (files + goal: readability, performance, structure, ...)?"
- "Is current agent-test coverage of those files enough to refactor safely?" — run the agent-tests-only coverage command (recipes:
../agentic-unit-test/docs/coverage-recipes.md) and show the per-file numbers for the target files. If any target file is poorly covered, recommend using theagentic-unit-testskill on that file first and let the user decide.
Step 2 — Preconditions (STOP if any fails)
- All agent tests AND all user tests pass before touching anything.
- Git repo, clean tree (
git status --porcelainempty apart from plan files). Refactoring without git checkpoints is not allowed — STOP and say why.
Step 3 — Plan
Write agentic-refactor-plan.md at the repo root (resume it if present — continue from the first non-done entry after re-running the suite):
# Agentic refactor plan
Goal:
- [ ] step 1: — pending
- [ ] step 2: ...
Statuses: pending | in-progress | done | REVERTED (3 attempts): . Update after every step.
Step 4 — Refactor loop (per plan step)
- Mark
in-progress. Make ONE small change. - Build + run the FULL test suite (agent + user tests).
- All green?
- Yes → lint changed files, fix lint in main code (allowed here), commit:
git commit -am "refactor: [agentic-refactor]". Markdone. - No → fix the CODE (never a test). 3 attempts. After the 3rd:
git checkout -- .back to the last checkpoint, markREVERTED (3 attempts):, move on.
- Performance goal? Measure before/after (the suite's runtime is not a benchmark — use the project's benchmark or a quick timed script in the scratchpad) and record numbers in the plan entry.
Step 5 — Report
- Goal: restated, achieved or not.
- Steps: done vs reverted (with reasons).
- Verification: final full-suite run result (must be all green).
- Measurements: before/after numbers if performance was the goal.
- Commits made, in order.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: jpbaking
- Source: jpbaking/agentic-tests
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.