Project Memory logo

Project Memory

Organization
TheBushidoCollective
project-memory

Use when setting up or organizing Claude Code project memory (CLAUDE.md, .claude/rules/) for better context awareness, consistent behavior, and project-specific instructions.

Overview

PublisherTheBushidoCollective
Repositoryhan
Skill nameproject-memory
Stars
195
Forks
20
Bundled files
Instructions only
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 TheBushidoCollective on GitHub. Read the source before you install it.

Installation

Install the Project Memory 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.
  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/TheBushidoCollective/han.git /tmp/han
mkdir -p .claude/skills
cp -r /tmp/han/plugins/core/skills/project-memory .claude/skills/project-memory
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Project Memory 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 Project Memory 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 Project Memory 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.

Project Memory Skill

Set up and organize Claude Code's project memory system for consistent, context-aware assistance.

Core Principle

Project memory teaches Claude Code how to work with your specific codebase. Well-organized project memory leads to more accurate, consistent, and helpful responses.

Memory Hierarchy

Claude Code reads instructions in this order (higher = more precedence):

  1. Enterprise policy (managed, highest)
  2. User memory (~/.claude/CLAUDE.md)
  3. Project memory (CLAUDE.md in project root)
  4. Modular rules (.claude/rules/*.md)
  5. Local memory (CLAUDE.local.md, gitignored)

Later sources override earlier ones for conflicting instructions.

File Types

CLAUDE.md (Project Root)

Purpose: Primary project instructions, conventions, and context

Location: Project root directory

Visibility: Checked into git, shared with team

Contents:

  • Project overview and architecture
  • Development commands (build, test, lint)
  • Coding conventions and patterns
  • Important constraints or requirements
  • Links to key documentation

.claude/rules/*.md

Purpose: Modular, path-specific rules

Location: .claude/rules/ directory

Visibility: Checked into git

Features:

  • Automatically loaded based on file path
  • Supports subdirectories
  • Can use YAML frontmatter with globs for path-specific targeting

CLAUDE.local.md

Purpose: Personal, machine-specific instructions

Location: Project root directory

Visibility: Should be gitignored

Use cases:

  • Personal preferences
  • Local environment paths
  • Machine-specific configurations
  • Experimental instructions

Setting Up Project Memory

1. Create CLAUDE.md

Start with essential project information:

markdown
# Project Name

Brief description of what this project does.

## Development Commands

    # Build
    npm run build

    # Test
    npm test

    # Lint
    npm run lint

## Architecture

- `src/` - Source code
- `tests/` - Test files
- `docs/` - Documentation

## Conventions

- Use TypeScript for all new code
- Follow existing patterns in the codebase
- Run tests before committing

## Key Files

- `src/index.ts` - Main entry point
- `src/config.ts` - Configuration handling

2. Add Modular Rules (Optional)

Create path-specific rules in .claude/rules/:

text
.claude/
  rules/
    api.md          # Rules for API code
    tests.md        # Rules for test files
    components/
      forms.md      # Rules for form components

3. Path-Specific Rules with Globs

Use YAML frontmatter to target specific paths:

markdown
---
paths: ["src/api/**/*.ts", "src/services/**/*.ts"]
---

# API Development Rules

- All API functions must be async
- Always validate input parameters
- Use consistent error response format
- Include JSDoc with @throws annotations

4. Import Syntax

Reference other files from CLAUDE.md:

markdown
# Project Instructions

See architecture: @docs/ARCHITECTURE.md
See API guidelines: @docs/API_GUIDELINES.md

Imported files are treated as direct context.

CLAUDE.md Template

markdown
# [Project Name]

[One-paragraph description of what this project does]

## Quick Start

    # Install dependencies
    [command]

    # Run development server
    [command]

    # Run tests
    [command]

## Architecture

[Brief overview of project structure]

### Key Directories

- `src/` - [Description]
- `tests/` - [Description]
- `config/` - [Description]

### Key Files

- `src/index.ts` - [Description]
- `src/config.ts` - [Description]

## Development Guidelines

### Code Style

- [Style convention 1]
- [Style convention 2]

### Testing

- [Testing convention 1]
- [Testing convention 2]

### Git Workflow

- [Commit convention]
- [Branch convention]

## Common Tasks

### Adding a New Feature

1. [Step 1]
2. [Step 2]
3. [Step 3]

### Running Tests

    [test command]

## Important Notes

- [Critical constraint or requirement]
- [Security consideration]
- [Performance consideration]

Path-Specific Rules Examples

For API Code

markdown
---
paths: ["src/api/**/*.ts"]
---

# API Development Rules

## Request Handling

- Validate all input with zod schemas
- Return consistent error format: `{ error: string, code: string }`
- Always set appropriate HTTP status codes

## Authentication

- All endpoints require auth unless in ALLOWED_PUBLIC_ROUTES
- Use `requireAuth()` middleware

## Response Format

    // Success
    { data: T, meta?: { page, total } }

    // Error
    { error: string, code: string, details?: object }

For Test Files

markdown
---
paths: ["**/*.test.ts", "**/*.spec.ts"]
---

# Testing Rules

## Structure

- Use `describe()` for grouping related tests
- Use `it()` with descriptive names: "should [action] when [condition]"
- One assertion per test when possible

## Mocking

- Prefer dependency injection over mocking
- Mock at boundaries (API, database, file system)
- Clear mocks between tests

## Coverage

- All public functions need tests
- Test happy path and error cases
- Include edge cases

For React Components

markdown
---
paths: ["src/components/**/*.tsx"]
---

# Component Rules

## Structure

- One component per file
- Export component as default
- Co-locate styles with component

## Props

- Define props interface above component
- Use destructuring in function signature
- Document required vs optional props

## State

- Prefer controlled components
- Lift state up when shared between components
- Use hooks for complex state logic

Best Practices

Keep It Concise

Bad:

markdown
## Introduction

This project is a web application that allows users to manage their tasks.
It was started in 2023 and has grown to include many features including
task creation, task editing, task deletion, task filtering, task sorting,
task searching, task sharing, and task exporting...

Good:

markdown
Task management web app. Users create, edit, filter, and share tasks.

Be Specific and Actionable

Bad:

markdown
Write good code and follow best practices.

Good:

markdown
- Use TypeScript strict mode
- Run `npm run lint` before committing
- All functions need JSDoc comments

Include Commands

Bad:

markdown
Build the project before deploying.

Good:

markdown
    npm run build
    npm run deploy

Use Imports for Long Content

Bad: Everything in one huge CLAUDE.md

Good:

markdown
# Project

Quick overview here.

## Detailed Documentation

Architecture: @docs/ARCHITECTURE.md
API Guide: @docs/API.md
Deployment: @docs/DEPLOYMENT.md

Path-Specific Over Generic

Bad:

markdown
# CLAUDE.md
When writing tests, always use Jest.
When writing API code, always validate input.
When writing components, always use TypeScript.

Good:

.claude/rules/tests.md     -> Jest rules
.claude/rules/api.md       -> Validation rules
.claude/rules/components.md -> TypeScript rules

When to Update Project Memory

Add New Instructions

  • Onboarding reveals missing context
  • Repeated questions indicate gaps
  • New conventions are established
  • Architecture changes significantly

Review Existing Instructions

  • Code changes make instructions outdated
  • Team feedback indicates confusion
  • Patterns evolve over time

Common Patterns

Monorepo Setup

markdown
# Monorepo

## Packages

- `packages/core/` - Core library
- `packages/cli/` - CLI tool
- `packages/web/` - Web application

## Commands

    # Build all packages
    npm run build

    # Test specific package
    npm run test --workspace=packages/core

## Rules

See package-specific rules in each package's `.claude/rules/` directory.

Environment-Specific Notes

Keep in CLAUDE.local.md (gitignored):

markdown
# Local Setup Notes

## Environment

- Using Node 20.x
- PostgreSQL running on port 5433 (not default)
- Redis running in Docker

## Personal Preferences

- Prefer verbose test output
- Always run lint before suggesting changes

Integration with Han Plugins

Han plugins can contribute to project memory through hooks:

  • SessionStart hooks can inject plugin-specific context
  • UserPromptSubmit hooks can add reminders about conventions
  • Blueprints complement CLAUDE.md with detailed system documentation

Troubleshooting

Claude Code ignores instructions

  1. Check file location (must be project root for CLAUDE.md)
  2. Check syntax (YAML frontmatter must be valid)
  3. Check glob patterns match the files you're editing
  4. More specific rules override general ones

Rules conflict between files

  • Later in hierarchy wins
  • More specific globs win over general
  • Local overrides project

Performance with large CLAUDE.md

  • Use imports for detailed docs
  • Keep CLAUDE.md focused on essentials
  • Move detailed rules to .claude/rules/

Remember

  1. Start small - Basic commands and conventions first
  2. Be specific - Actionable instructions, not vague guidelines
  3. Stay current - Update when code changes
  4. Use hierarchy - Modular rules for path-specific needs
  5. Test it - Verify Claude Code follows your instructions

Good project memory makes Claude Code a better collaborator.

Frequently asked questions

What does the Project Memory AI skill do?

Use when setting up or organizing Claude Code project memory (CLAUDE.md, .claude/rules/) for better context awareness, consistent behavior, and project-specific instructions.

Why use Project Memory on TypingMind?

Because you install it once and use it with any model. Project Memory 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 Project Memory in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/TheBushidoCollective/han/tree/main/plugins/core/skills/project-memory. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Project Memory?

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 Project Memory?

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

Is the Project Memory AI skill free?

It is published on GitHub by TheBushidoCollective. Check the repository for licensing terms. 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 👇