suggest-tests
Suggest tests you should write based on your code. Uses AST parsing to find functions and suggests tests based on code patterns. Use when writing new code or modifying existing code.
- License 许可
- MIT
- 所属仓库
- varun-singhh/lfg
- 最近更新
- 2026-10-26
- Stars
- ★ 10
- Forks
- 3
01 前言 Front Matter
- name
- suggest-tests
- lanes
- [ "standard", "full" ]
- phase
- build
- reads
- [ "git" ]
- author
- Varun Singh
- writes
- []
- description
- Suggest tests you should write based on your code. Uses AST parsing to find functions and suggests tests based on code patterns. Use when writing new code or modifying existing code.
- auto-trigger
- false
03 SKILL.md 正文
Steps
-
Run test suggester engine:
lfg suggest-tests <file> --jsonThis engine is a heuristic first pass based on function signatures and code patterns. It is not a substitute for actual coverage analysis.
-
Review and present suggestions:
functions: public functions/classes found (private ones skipped unless that's all there is)suggested_tests: each hastest_name,priority(1-3),category,reason(e.g., "Found 'return None' in function")related_tests: existing test files that import or match the module namepriority_summary: counts by priority
-
No coverage estimate: There is no "coverage improvement estimate" key or line - we can't measure coverage from static analysis alone.
Output
- List of functions and classes found
- Suggested tests with priority and concrete reason (e.g., "returns None when fetch fails" from
return Nonein code) - Related existing test files (so the user knows where to add)
- Priority summary: must have, should have, nice to have
Rules
- Skip private (leading
_) functions/classes unless they're the only ones. - Test names should hint at the branch/edge:
test_<func>_returns_none_when_appropriatenot justtest_<func>_valid_input. - Reasons come from the code:
return None,raise X,if not x, comparisons, loops. - Drop the "coverage improvement estimate" entirely - we can't measure it.
- Important: This is a heuristic engine. Verify each suggestion makes sense for the code before recommending it.
04 同仓库更多 Skills
wizard
Guided start-to-finish run of the whole pipeline on an idea or a Linear issue. Runs every stage (grill, plan, build, check, secure, pentest, review, ship check, ship packet, learn), explains each one in plain words before and after, and loops failures through /fix until all 8 gates are green (max 3 loops per gate). Use when the user types "/wizard <idea>", "/wizard LIN-123", "/wizard resume", "walk me through everything", "do every step and explain it". Explicit only; never auto-triggered.
why
Explains why code looks the way it does: the commits that shaped a file, a function or a few lines, what each one changed and why, and the issues, tickets and pull requests they mention. Use when the user asks "why is this here?", "why was this changed?", "who added this and what for?", "what's the story behind X?", or is about to change code they don't understand.
which
Looks at graph status, the current run folder, git status and Linear, then tells you the single next skill to run and why. Use when the user says "which skill do I use?", "what now?", "what next?", "where was I?", "I'm lost", or starts a session without saying what they want.
spike
Builds a throwaway prototype to answer one design question, in a scratch folder inside the run folder, then deletes it and keeps only the conclusion. Use when the user says "try a quick prototype", "would this approach work?", "spike this", "let me feel this state model", "show me a few UI options", or when a plan has an open question that a cheap working artifact would settle.
ship
Proves the change is shippable and hands it to you: re-runs the green gate, runs the ship check (Docker build, scan, run, smoke test, delete, verify cleanup) and the shipping checklist, then writes COMMIT_MSG.md and PR_BODY.md. Never commits, pushes or deploys. Use when the user says "ship it", "ready for a PR", "prep the commit", "is it shippable?".
secure
Full security and vulnerability check on anything new: packages, URLs, container images, CI actions, AI models, MCP servers, plus security-sensitive code. Uses local scanners and online vulnerability intelligence (public metadata only), and reviews security-sensitive code with Cloudflare's security-audit method. Use when the user asks "is this safe?", "can I add <package>?", "check this URL", "scan for vulnerabilities", or when a diff adds or changes a dependency, URL, image, action, model or security-sensitive code. `/secure audit` runs Cloudflare's full six-phase audit, only when the user types it.