Skip to content
Back to skills

Build Modules

ASecurity

Builds and evaluates Python module layers for the Gentleman-Skills ecosystem. Generates eval scenarios, adapts skills for LLM targets, and performs code analysis (dead code, complexity, blast radius). Trigger: When working in `build_modules/` — adding, modifying, or debugging module generation, adaptation, or analysis.

  • 5 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added October 4, 2026
ai-agentspythongobashnextjsfastapidebuggingapi

Works with

  • cursor
  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned October 4, 2026

npx -y skills add JNZader/repoforge --skill build_modules --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Build Modules?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Build Modules
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jnzader-build-modules/badge)](https://www.skillsdirectory.com/skills/jnzader-build-modules)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: build_modules-layer
description: >
  Builds and evaluates Python module layers for the Gentleman-Skills ecosystem.
  Generates eval scenarios, adapts skills for LLM targets, and performs code
  analysis (dead code, complexity, blast radius).
  Trigger: When working in `build_modules/` — adding, modifying, or debugging
  module generation, adaptation, or analysis.
license: Apache-2.0
metadata:
  author: repoforge
  version: "1.0"
  complexity: medium
  token_estimate: 1200
  dependencies: []
  related_skills: [eval-layer, repoforge-layer]
---

<!-- L1:START -->
# build_modules-layer

This layer provides tools for building, evaluating, and analyzing Python modules within the Gentleman-Skills ecosystem. It handles module generation, LLM target adaptation, and code quality analysis.

**Trigger**: When working in `build_modules/` directory — adding, modifying, or debugging module generation, adaptation, or analysis.
<!-- L1:END -->

<!-- L2:START -->
## Quick Reference

| Task | Pattern |
|------|---------|
| Run eval scenarios | `python -m eval.harness run_all` |
| Adapt skills for LLM targets | `adapt_for_cursor/Codex/Gemini/Copilot` |
| Detect dead code | `detect_dead_code()` |

## Critical Patterns (Summary)
- **Pattern 1: Module Generation**: Use `make_fastapi_crud_module`, `make_nextjs_page_module`, `make_mixed_layer`, or `make_go_service_module` from `eval/harness.py` to generate module skeletons in various frameworks.
- **Pattern 2: Skill Adaptation**: Use `adapt_for_cursor`, `adapt_for_codex`, `adapt_for_gemini`, or `adapt_for_copilot` from `repoforge/adapters.py` to transform skill dictionaries for specific LLM targets.

## When to Use

- Adding a new module generation function to `eval/harness.py`
- Adapting existing skills for a different LLM target platform
- Detecting dead code or analyzing module complexity
- Running eval scenarios against generated modules

## Adding a New Module Generation Function

1. Add a new function to `eval/harness.py` following the pattern `make_<framework>_module() -> tuple[dict, dict]`
2. Export the function in `eval/harness.py` `__all__` if present
3. Test with `run_scenario` using the new module config
4. Verify output with `print_report`

## Commands

```bash
python -m eval.harness run_all
python -m eval.harness run_scenario <scenario_name>
adapt_for_cursor <skills_json>
adapt_for_copilot <skills_json>
detect_dead_code <ast_symbols_dict>
```

## Anti-Patterns

### Don't: Mix adaptation targets — using `adapt_for_copilot` skills with `adapt_for_cursor` expectations — each adapter formats skill dicts differently for its target LLM, causing integration failures.

```python
# BAD: Mixing adaptation targets
skills = adapt_for_cursor(skills_dict)
# Later using skills with Cursor — works
# But passing these same skills to adapt_for_codex will produce
# incorrectly formatted output for Codex's expectations.
```
<!-- L3:END -->

Files in this skill

  • SKILL.md2.9 KB
  • graph_context/SKILL.md1.8 KB
  • harness/SKILL.md3.6 KB
  • incremental/SKILL.md2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.