ProSkillsLibraryFreePassScan
Agent Ops

Agent Ops · agent skill

Think First

Five lines before the edit. A ledger after.

What it does

Loads when it is needed

Your agent loads it when the agent should decide before it edits, keep the diff small and prove it verified. It carries 5 rules and reads a profile.md with your details before it starts, so the output matches your brand and project.

Same prompt, with and without

Make webhook retries configurable

Prompt · Make the webhook retry count configurable. Right now it's hardcoded to 3.

src/webhooks/send.ts (48 lines):
  const MAX_RETRIES = 3;
  export async function sendWebhook(url: string, body: unknown) {
    for (let attempt = 1; attempt <= MAX_RETRIES; attempt++) {
      const res = await fetch(url, { method: 'POST', body: JSON.stringify(body) });
      if (res.ok) return;
      await sleep(attempt * 500);
    }
    throw new Error('webhook failed');
  }
Only caller: src/jobs/notify.ts. Config is read from env in src/config.ts (zod-validated, e.g. PORT, DATABASE_URL). Tests: src/webhooks/send.test.ts, 2 tests, `npm test`. Typecheck: `npm run typecheck`. Nobody has asked for per-endpoint retries.

Profile used: Agents: Claude Code; Project: notifications service; Stack: TypeScript, Node 20, vitest; Team size: 3

Without the skill
Approach: read the count from env in `config.ts`, pass it into `sendWebhook` from its only caller. `send.ts` stays free of env access, and the 2 existing tests keep working through a default. Written from your context, not checked against the real files. `config.ts`: `WEBHOOK_MAX_RETRIES: z.coerce.number().int().min(1).max(10).default(3),`. The bounds stop `0` (never sends) and `1000`. `send.ts`: const DEFAULT_MAX_RETRIES = 3; export async function sendWebhook(url, body, { maxRetries = DEFAULT_MAX_RETRIES } = {}) { for (let attempt = 1; attempt <= maxRetries; attempt++) { ...same loop... } } `notify.ts`: `await sendWebhook(url, body, { maxRetries: config.WEBHOOK_MAX_RETRIES });` `send.test.ts`: two tests with a failing fetch: `maxRetries: 1` calls fetch once and rejects, `maxRetries: 5` calls it 5 times and rejects. Verify: `npm run typecheck && npm test`, and set `WEBHOOK_MAX_RETRIES=5` locally. Notes: the old `MAX_RETRIES = 3` is total attempts, and I kept that. The default of 3 now lives in two places; make the parameter required if you want one source. The loop sleeps after the last failure before throwing; I left it. No per-endpoint retries.
With the skill
Pre-flight · configurable webhook retries (small: one behaviour, no schema, API or dependency change) Goal: the retry count comes from an env var instead of the hardcoded 3, and stays 3 when unset. Assumptions: (1) `config.ts` exports a parsed object `send.ts` can import: read it. (2) importing it doesn't make the 2 tests need env vars: check what they set. (3) zod supports a default, as PORT likely does: check. Simplest: add `WEBHOOK_MAX_RETRIES` as `z.coerce.number().int().min(1).default(3)`; in `send.ts` replace the constant with it. Rejected: a `maxRetries` parameter set from `notify.ts`. It touches a 4th file, and per-endpoint retries weren't requested. Will not touch: the backoff, the error message, the fetch call, `notify.ts`, `sendWebhook`'s signature. Budget: small, halved for a team of 3 -> 1-2 files, 40 lines, 0 deps, 0 abstractions. Verify: `npm test`; `npm run typecheck`. Stopping: over budget on files. The change needs `config.ts`, `send.ts` and `send.test.ts`, 3 against 1-2. Lines come to about 20. 1. Raise the file budget to 3 (recommended): the test is part of the change. 2. Skip the test: 2 files, but no coverage of the new behaviour. After approval: schema entry, swap the constant, one test with `fetch` always failing and the count set to 2, asserting 2 calls. Then run both commands and end with the ledger. Nothing read or run yet, so the assumptions are unchecked; if (2) fails I'll come back with a new pre-flight.

Both answers from the same model (Claude sonnet), 2026-10-17. The one without the skill was written in a separate session that never saw it. Shortened where marked with …

Install

One command, in your project

It detects your agent; add --agent all for every agent.

npx proskills-cli add think-first --order <order id from your receipt>

Or copy the skill folder (the one holding SKILL.md) into the directory your agent reads, then restart it or start a new session.

AgentThis projectEvery project
Claude Code.claude/skills/~/.claude/skills/
Cursor.agents/skills/ (or .cursor/skills/)~/.cursor/skills/
Codex.agents/skills/~/.agents/skills/
Gemini CLI.agents/skills/ (or .gemini/skills/)~/.gemini/skills/

Changelog

What changed

  • v1.0.0 · 2026-10-17
    • First versioned release: A five-line pre-flight before every edit, a diff budget, a ledger of what actually ran.
    • Scanned 100/100 before release.

Keep it current with npx proskills-cli update; your profile.md is never touched. Everyone who bought it gets the update free and an email when it lands.

Same collection

More from Agent Ops

The scan checks spec compliance, token cost, clarity and security patterns. A clean scan is not a guarantee: static scanners can be evaded. Scan any skill yourself.