Base logo

Base

Organization
aspenkit
base

Core conventions, tech stack, and project structure for aspens

Overview

Publisheraspenkit
Repositoryaspens
Skill namebase
Stars
102
Forks
7
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by aspenkit on GitHub. Read the source before you install it.

Installation

Install the Base AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/aspenkit/aspens/tree/main/.agents/skills/base
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/aspenkit/aspens.git /tmp/aspens
mkdir -p .claude/skills
cp -r /tmp/aspens/.agents/skills/base .claude/skills/base
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Base in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Base on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Base is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

You are working in aspens — a CLI that keeps coding-agent context accurate as your codebase changes. Scans repos, generates project-specific instructions and skills for Claude Code and Codex CLI, and keeps them fresh.

Tech Stack

Node.js 20+ (ESM) | Commander | Vitest | es-module-lexer | @clack/prompts | picocolors

Commands

  • npm test — Run vitest suite
  • npm start / node bin/cli.js — Run CLI
  • aspens scan [path] — Deterministic repo analysis (no LLM)
  • aspens doc init [path] — Generate skills + hooks + AGENTS.md (--target claude|codex|all, --recommended for full recommended setup)
  • aspens doc impact [path] — Show freshness, coverage, and drift of generated context (--apply for auto-repair, --backend/--model/--timeout/--verbose for LLM interpretation)
  • aspens doc sync [path] — Incremental skill updates from git diffs
  • aspens doc graph [path] — Rebuild import graph cache (.claude/graph.json)
  • aspens add <type> [name] — Install templates (agents, commands, hooks)
  • aspens customize agents — Inject project context into installed agents
  • aspens save-tokens [path] — Install token-saving session settings (--recommended for no-prompt install, --remove to uninstall)
  • Debug: ASPENS_DEBUG=1 dumps raw stream events to $TMPDIR/aspens-debug-{stream,codex-stream}.json
  • Env knob: ASPENS_TIMEOUT (seconds) overrides default LLM timeout when --timeout not passed

Architecture

CLI entry (bin/cli.js) → command handlers (src/commands/) → lib modules (src/lib/)

  • src/lib/scanner.js — Deterministic repo scanner (languages, frameworks, domains, structure)
  • src/lib/graph-builder.js — Static import analysis via es-module-lexer (hub files, clusters, priority)
  • src/lib/graph-persistence.js — Graph serialization, subgraph extraction, code-map + index generation
  • src/lib/runner.js — Claude/Codex CLI wrapper (runClaude for stream-json, runCodex for Codex JSONL); also hosts loadPrompt (partial substitution) and parseFileOutput/validateSkillFiles
  • src/lib/context-builder.js — Assembles repo files into prompt-friendly context
  • src/lib/skill-writer.js — Writes skill files and directory-scoped files, generates skill-rules.json, merges settings
  • src/lib/skill-reader.js — Parses skill files, frontmatter, triggers: blocks, legacy activation patterns, keywords
  • src/lib/diff-classifier.js — Maps changed files to affected skills for doc-sync
  • src/lib/diff-helpers.js — Targeted file diffs and prioritized diff truncation for doc-sync
  • src/lib/git-helpers.js — Git repo detection, git root resolution, diff retrieval, log formatting
  • src/lib/git-hook.js — Post-commit git hook installation/removal for auto doc-sync (monorepo-aware)
  • src/lib/impact.js — Context health analysis: domain coverage, hub surfacing, drift detection, hook health, save-tokens health, usefulness summary, value comparison, opportunities
  • src/lib/save-tokens.js — Save-tokens config defaults, settings builders, gitignore/readme generators
  • src/lib/timeout.js — Timeout resolution (--timeout flag > ASPENS_TIMEOUT env > default)
  • src/lib/errors.js — CliError class (structured errors caught by CLI top-level handler)
  • src/lib/target.js — Target definitions (claude/codex), config persistence (.aspens.json) with saveTokens feature config; getAllowedPaths for multi-target sanitization
  • src/lib/target-transform.js — Transforms Claude-format output to other target formats
  • src/lib/backend.js — Backend detection and resolution (which CLI generates content)
  • src/lib/path-resolver.js / src/lib/source-exts.js — Source-file extension and path resolution helpers shared by scanner/graph
  • src/lib/parsers/ — Language-specific import parsers (TypeScript, Python)
  • src/lib/frameworks/ — Framework-specific detectors (e.g. Next.js)
  • src/prompts/ — Prompt templates with {{partial}} and {{variable}} substitution
  • src/templates/ — Bundled agents, commands, hooks, and settings for aspens add / doc init / save-tokens

Critical Conventions

  • Pure ESM — "type": "module" throughout; use import/export, never require()
  • es-module-lexer WASM — must await init before calling parse() in graph-builder
  • Claude CLI execution — runClaude() spawns claude -p with stream-json; always use --verbose flag with stream-json
  • Codex CLI execution — runCodex() spawns codex exec --json --sandbox read-only --ask-for-approval never --ephemeral; returns { text, usage } matching runClaude interface
  • Stdin with backpressure — runClaude/runCodex pipe prompts via stdin and respect drain when write() returns false; never rewrite to use args (shell length limits)
  • Path sanitization — parseFileOutput() restricts writes to .claude/ and AGENTS.md by default; accepts allowedPaths override for multi-target via getAllowedPaths(targets)
  • Read-only LLM tools — customize-style commands pass allowedTools: ['Read', 'Glob', 'Grep']; never broaden without review
  • Prompt partials — {{name}} in prompt files resolves to src/prompts/partials/name.md first, then falls back to template variables
  • Target/Backend distinction — Target = output format/location; Backend = which LLM CLI generates content. Config persisted in .aspens.json. Customize is Claude-only (CliError if targets: ['codex'])
  • Scanner is deterministic — no LLM calls; pure filesystem analysis
  • CliError pattern — command handlers throw CliError instead of calling process.exit(); caught at top level in bin/cli.js
  • Monorepo support — getGitRoot() resolves the actual git root; hooks, sync, and impact scope to the subdirectory project path
  • Verify before claiming — Never state something is configured/running/done without confirming in-session

Structure

  • bin/ — CLI entry point (commander setup, CliError handler)
  • src/commands/ — Command handlers (scan, doc-init, doc-impact, doc-sync, doc-graph, add, customize, save-tokens)
  • src/lib/ — Core library modules
  • src/prompts/ — Prompt templates + partials
  • src/templates/ — Installable agents, commands, hooks, settings
  • tests/ — Vitest test files

Last Updated: 2026-05-11

Frequently asked questions

What does the Base AI skill do?

Core conventions, tech stack, and project structure for aspens

Why use Base on TypingMind?

Because you install it once and use it with any model. Base is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Base in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/aspenkit/aspens/tree/main/.agents/skills/base. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Base?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Base?

As many as you like. As long as a model supports skills, you can use Base with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Base AI skill free?

Yes. It is published on GitHub by aspenkit under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇