Skip to content
Back to skills

Canonical Structure

ASecurity

Sub-skill of repo-structure: Canonical Structure (+1).

  • 17 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 9, 2026
toolspythongogit

Works with

  • cli

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill canonical-structure --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Canonical Structure?

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

Security grade badge for Canonical Structure
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-canonical-structure/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-canonical-structure)

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: repo-structure-canonical-structure
description: 'Sub-skill of repo-structure: Canonical Structure (+1).'
version: 1.4.0
category: workspace
type: reference
scripts_exempt: true
---

# Canonical Structure (+1)

## Canonical Structure


```
repo/
  src/
    <package_name>/        ← installed package root (snake_case)
      __init__.py          ← required at every level
      common/              ← cross-cutting utilities
      modules/             ← domain feature modules
        <domain>/
          __init__.py
          core.py          ← main logic
          utils.py         ← helpers
      cli/                 ← command-line entrypoints (if any)
  tests/
    <domain>/              ← mirrors src/<package>/<domain>/
      unit/
      integration/
      fixtures/
  docs/
  config/
  scripts/
  data/
  reports/                 ← gitignored (generated)
  pyproject.toml           ← required at repo root
  pytest.ini               ← required; must include pythonpath = src
```


## Rules


1. **One package per `src/`** — `src/` contains exactly `src/<package_name>/`. No other
   Python packages at `src/other_package/` level.
2. **`__init__.py` required** at every directory that is a Python package.
3. **`pythonpath = src`** in `pytest.ini` — never rely on PYTHONPATH env variable for CI.
4. **Tests mirror src** — `tests/<domain>/` maps to `src/<package>/<domain>/`.
   Do NOT use `tests/modules/<domain>/` wrapper — the `modules/` level is redundant.
5. **No loose scripts at root** — ad-hoc `.py` files at repo root belong in `scripts/`
   or `src/<package>/cli/` or `src/<package>/tools/`.

---

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.

Comments

Loading comments…

Newsletter

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