All skills
simota avatar
by shingo imotasimota/agent-skills85 stars
15

Refactoring code: variable naming, function extraction, magic number constants, dead code removal. Does not change behavior. Not for bugs/security (Judge), tests (Radar), or features (Builder).

Use this Skill: https://skilld.dev/gh/simota/agent-skills/zen

This session only. Nothing lands on disk.

referencefunction-splitting.md

≈365 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Function Splitting Delta

Purpose: Zen behavior-preserving seam and verification contract. Extraction patterns are model-known.

Trigger Signals

Consider splitting when measured cognitive complexity is high, responsibilities or abstraction levels mix, I/O and transformation are entangled, or local variables form distinct lifetimes. Length alone is not proof.

Do not split a tightly coupled algorithm, measured hot path, or coherent sequential procedure merely to satisfy a line threshold. Avoid one-use helpers that make navigation harder.

Workflow

  1. Pin current observable behavior with focused tests or characterization coverage.
  2. Identify seams at data transformations, I/O boundaries, commands/queries, resource lifetime, or independent policy decisions.
  3. Name the responsibility and design explicit inputs/outputs before extraction.
  4. Extract one seam at a time and run the focused verification after each step.
  5. Measure complexity and readability; inline a split that increased coupling or parameter plumbing.

Verification

  • Same results, exceptions, side effects, ordering, and resource cleanup.
  • No duplicated policy or hidden shared state introduced.
  • Dependencies and parameters do not grow without a clearer boundary.
  • Performance-sensitive paths retain measured baseline behavior.

Route type problems to Quill, dead branches to Zen dead/sweep, layer-boundary problems to Atlas, and measured regressions to Bolt.

Source: SKILL.md on GitHub

1 warning13d5 checks · Risk SAFE
  • Gen Agent Trust Hub13d

    No security issues detected. The skill provides comprehensive and well-structured instructions for code refactoring and quality review. It utilizes standard developer tools, references reputable technical documentation from trusted organizations, and includes explicit safety boundaries to ensure behavior-preserving changes.

  • Socket13d

    No alerts

  • Snyk13d

    Risk: LOW · No issues

  • Runlayer6mo

    1/15 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at e307415. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 2 weeks ago

README badge

README badge for simota/agent-skills/zen