base

base is a skill for Claude Code from alinaqi/maggy. It costs 14 tokens per session (4,563 once invoked), scanned A, original, MIT.

A set of coding rules and a test-driven development workflow, where tests are written before or alongside code. It also breaks work into small, specific tasks.

In plain words
What is it for?
Use it to set limits for functions, files, and folders; avoid circular dependencies; plan atomic tasks; and guide test-first development.
Why use it?
It helps keep code small, easier to understand, and less tangled as a project grows.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it to set limits for functions, files, and folders; avoid circular dependencies; plan atomic tasks; and guide test-first development.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alinaqi/maggy/base
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add alinaqi/maggy --skill base
Clone the repo
git clone --depth 1 https://github.com/alinaqi/maggy

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for base

README.md
[![agentmods](https://agentmods.dev/badge/skills/alinaqi/maggy/base.svg)](https://agentmods.dev/skills/alinaqi/maggy/base)
Your own site
<a href="https://agentmods.dev/skills/alinaqi/maggy/base"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/base.svg" alt="Measured on agentmods" height="20"></a>
Per session 14 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,563 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Privilege Escalation · line 412
    Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
    Fix: Remove references to credential paths. Use environment variables or secrets managers. For docs, use placeholder paths (e.g., /path/to/config). Never load .env or token files in production code paths.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00014 $0.04563
Opus 5 $0.00007 $0.02282
Sonnet 5 $0.00003 $0.00913
Haiku 4.5 $0.00001 $0.00456

Measured 8d ago against content hash 5d8a2db21750, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

base scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/base/SKILL.md · 534 lines

How it starts

The opening of the file, as written. The whole thing — 534 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Base Skill - Universal Patterns

Core Principle

Complexity is the enemy. Every line of code is a liability. The goal is software simple enough that any engineer (or AI) can understand the entire system in one session.


Simplicity Rules

These limits apply to every file created or modified.

Function Level

  • Maximum 20 lines per function - if longer, decompose IMMEDIATELY
  • Maximum 3 parameters per function - if more, use an options object or decompose
  • Maximum 2 levels of nesting - flatten with early returns or extract functions
  • Single responsibility - each function does exactly one thing
  • Descriptive names over comments - if you need a comment to explain what, rename it

File Level

  • Maximum 200 lines per file - if longer, split by responsibility BEFORE continuing
  • Maximum 10 functions per file - keeps cognitive load manageable
  • One export focus per file - a file should have one primary purpose

Module Level

  • Maximum 3 levels of directory nesting - flat is better than nested
  • Clear boundaries - each module has a single public interface
  • No circular dependencies - ever

Enforcement Protocol

Before completing ANY file:

  1. Count total lines - if > 200, STOP and split
  2. Count functions - if > 10, STOP and split
  3. Check each function length - if any > 20 lines, STOP and decompose
  4. Check parameter counts - if any > 3, STOP and refactor

If limits are exceeded during development:

⚠️ FILE SIZE VIOLATION DETECTED

[filename] has [X] lines (limit: 200)

Splitting into:
- [filename-a].ts - [responsibility A]
- [filename-b].ts - [responsibility B]

Never defer refactoring. Fix violations immediately, not "later".


Architectural Patterns

Functional Core, Imperative Shell

  • Pure functions for business logic - no side effects, deterministic
  • Side effects only at boundaries - API calls, database, file system at edges
  • Data in, data out - functions transform data, they don't mutate state

Read the full file on GitHub · 534 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 534 lines · 14 tokens per session scan A 5d8a2db21750

Subscribe to this mod's changes

base is a skill published in the GitHub repository alinaqi/maggy (705 stars, last pushed 20d ago), licensed MIT. It adds 14 tokens to every session and 4,563 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

test-sweep

Run all test suites (unit, integration, API, E2E) and aggregate results into a summary report. Use after completing execution slices or before the Review Gate.

srnichols/plan-forge · 38 tokens

go-testing

Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.

Gentleman-Programming/gentle-ai · 26 tokens

memstack-automation-n8n-workflow-builder

Use this skill when the user says 'n8n workflow', 'build a workflow', 'automation workflow', 'connect services', or needs visual workflow design with node mapping, data transformations, and error handling for n8n. Do NOT use for standalone webhook endpoints or cron jobs.

cwinvestments/memstack · 68 tokens

verify

Runs this project's check chain through scripts/verify.py and reads the receipt it writes. Fires when tracked changes are finished, when the user asks whether work passes, before a commit, and before reporting a task done. Stays dormant in repositories with no detectable check chain, during read-only audits, and for…

cwinvestments/memstack · 71 tokens

memstack-development-webapp-testing

Use when the user says 'write browser tests', 'test this page', 'playwright test', 'e2e test', 'end to end test', 'browser test', 'test the UI', or needs Playwright-based browser testing for a web application. Do NOT use for unit tests, API tests, or non-browser testing.

cwinvestments/memstack · 75 tokens

app-user-story-qa

End-to-end app feature inventory and user-story testing workflow with a canonical tracker. Use when the user asks to audit every feature, derive expected behavior from code, test user journeys, or explicitly fix and retest documented UX or logistical defects.

majiayu000/spellbook · 54 tokens