Index of every page on this site: llms.txt
All skills
tristanmanchester avatar

/ai-codebase-deep-modules

@3323bc9
Run it yourself

Design or refactor cohesive modules with small, useful public contracts and enforceable dependency boundaries. Use for concrete architecture, coupling, refactoring, or agent-editability problems. Do not restructure a working codebase merely because an AI agent will edit it.

Use this Skill: https://skilld.dev/gh/tristanmanchester/agent-skills/ai-codebase-deep-modules

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencesprompts.md

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

Copy‑paste prompts for architecture work

These prompts are designed to be pasted into any agent chat.

THE EXACT PROMPT — Build a module map

Read this repository and produce a “Module Map” that matches how the product behaves.

  • Group code into 3–10 domains/features/services.
  • For each module: responsibilities, entrypoints, key data types, and current coupling risks.
  • Identify cross-import cycles and “junk drawer” directories (utils/shared/helpers).
  • Output a table and a short narrative summary.

THE EXACT PROMPT — Specify a deep module interface

For the module {module-name}, design a small public interface:

  • List the 3–12 exported functions/types.
  • Define inputs/outputs and error semantics.
  • Provide 2 examples (happy path + one edge case).
  • Define what is explicitly internal. Keep the interface boring and stable.

THE EXACT PROMPT — Plan an incremental refactor (strangler)

Create an incremental refactor plan to introduce deep modules without a rewrite:

  1. Create module folders + public entrypoints.
  2. Add contract tests at the boundaries.
  3. Wrap existing code behind the new interfaces until tests pass.
  4. Move internals behind internal/ gradually.
  5. Add boundary enforcement (lint/arch tests). Include checkpoints and rollback strategy.

THE EXACT PROMPT — Boundary enforcement options

Given this repo’s language/tooling, propose the lightest boundary enforcement that prevents:

  • imports from **/internal/**
  • cross-domain imports that bypass module entrypoints Include exact config snippets for lint rules and/or architecture tests.

THE EXACT PROMPT — Review this plan for realism

Review this architecture plan as a senior engineer.

  • What is risky or ambiguous?
  • What hidden dependencies might break?
  • Are the modules too shallow or too broad?
  • Where should we add contract tests first? Propose a revised plan that is safer and more incremental.

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No alerts1mo5 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    The skill provides architectural guidelines and templates for designing software modules. It contains no executable code and demonstrates security awareness by documenting the removal of previously insecure scripts. No security risks were identified.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

  • Runlayer8mo

    1/7 files flagged

  • ZeroLeaks6mo

    Score: 93/100 · 2 sections analyzed

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

Last checked against GitHub 2 weeks ago.

Steadyupdated last month
metadata
{
  "version": "2.0.0",
  "reviewed": "2026-09-13"
}

README badge

README badge for tristanmanchester/agent-skills/ai-codebase-deep-modules