@aprimediet/self-taught

Self-learning skill generator — reads your project, generates agentskills.io-compatible skills, and keeps them updated.

Packages

Package details

extensionprompt

Install @aprimediet/self-taught from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@aprimediet/self-taught
Package
@aprimediet/self-taught
Version
1.0.0
Published
Jun 25, 2026
Downloads
109/mo · 15/wk
Author
aditya.prima
License
unknown
Types
extension, prompt
Size
93.4 KB
Dependencies
0 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./index.ts"
  ],
  "prompts": [
    "./prompts"
  ],
  "skills": []
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

@aprimediet/self-taught

Self-learning skill generator for the pi coding agent.

Reads your project, generates agentskills.io-compatible skills, and keeps them updated across sessions.

Features

  • Project Intelligence — automatically analyzes tech stack, conventions, structure, and goals
  • Memory Integration — reads from @aprimediet/memory if available using the shared project marker
  • Skill Generation — determines which skills are useful and generates valid agentskills.io SKILL.md files
  • Skill Updates — detects project changes and updates generated skills
  • Placement Choice — asks whether to save as global (~/.pi/agent/skills/) or project (.pi/skills/) skill
  • AGENTS.md Integration — updates the project's AGENTS.md with a skills table
  • Memory Persistence — writes skill metadata to @aprimediet/memory if active

Quick Start

# Load the extension
pi -e ./extensions/self-taught/index.ts

# Run the skill generation workflow
/self-taught

Commands

Command Description
/self-taught Full workflow: analyze project, generate skills, update AGENTS.md
/self-taught check Quick check for project changes since last analysis
/self-taught status Show current state (profile, generated skills, memory)
/self-taught update Force re-generation of all skills (with confirmation)
/self-taught forget <name> Remove a generated skill

Configuration File

Self-taught reads user preferences from ~/.pi/agent/self-taught.json (same pattern as @aprimediet/memory). Config is re-read on every call — edits apply without reload.

Fields

Field Type Default Description
enabled boolean true Master switch
auto boolean true Lifecycle auto mode
scope string "ask" Default placement: global, project, or ask
model string "" Preferred model for skill generation (e.g. "claude-sonnet-4")

Precedence: bundled default → ~/.pi/agent/self-taught.json → CLI flags

Example

{
  "enabled": true,
  "auto": true,
  "scope": "project",
  "model": "claude-sonnet-4"
}

When model is set, the directive sent to the LLM includes a Model Preference section recommending that model for the skill generation workflow.

Auto Mode (Lifecycle Injection)

Self-taught hooks into pi's lifecycle to automatically detect when project skills might need updating — no manual /self-taught check needed.

Event What Happens
Session start (first run) Suggests running /self-taught if project never analyzed
After agent completes work Detects project changes and notifies if skills should be refreshed

The extension stays as the detection engine; the LLM decides whether to actually update skills — keeping the agent in control.

Flags

Flag Description
--self-taught-disabled Disable the extension entirely
--self-taught-scope <global|project|ask> Default skill placement (default: ask)
--self-taught-auto Enable automatic lifecycle hooks (default: true)
--self-taught-model <model> Preferred model for skill generation (overrides config file)

Companion Extensions

Compatible with @aprimediet/memory, @aprimediet/minion, and @aprimediet/codewalker. Uses the shared .pi/<project-id>.md marker system — never creates its own marker.