Skip to content

mong3125/code-wiki

code-wiki

code-wiki is a Codex plugin that helps coding agents build and maintain a useful, repository-local wiki while they work.

Instead of rediscovering the same architecture, commands, modules, and gotchas in every conversation, Codex can use the wiki to orient itself, inspect the right source files, and preserve durable project knowledge for future sessions.

Quickstart

Register the public code-wiki marketplace and install the plugin:

codex plugin marketplace add mong3125/code-wiki
codex plugin add code-wiki@code-wiki

Restart Codex, open your project, and start a new thread. Then ask:

Create a code-wiki for this repository.

Codex will inspect the repository and create a wiki/ directory with project-oriented Markdown pages.

Install Interactively

After registering the marketplace, you can install from the Codex plugin browser instead of using the second command:

codex
/plugins

Switch to the code-wiki marketplace, open the plugin, and select Install plugin. In the Codex app, restart the app and open Plugins to view or manage the installed plugin.

First Use

Use ordinary project requests. code-wiki is designed to activate when repository context matters:

Create a code-wiki for this repository.
Fix the failing authentication test.
Explain the document ingestion flow using the code-wiki.
Audit this code-wiki for stale or unsupported information.

Users do not need to explicitly say "use code-wiki" during normal project work. Once installed, the plugin checks for an existing wiki, reads only the relevant context, and updates durable knowledge when the project changes.

Problem

Important development context is usually spread across source code, tests, configuration, commands, checked-in documentation, and previous investigations. Coding agents often spend time reconstructing that context from scratch.

code-wiki keeps an operational map inside the repository. It can capture:

  • Project structure and architecture
  • Domain and module responsibilities
  • Entry points and data flow
  • Build, test, and development commands
  • Dependencies, invariants, risks, and gotchas
  • Source paths that should be verified before a change

The source code remains the source of truth. If the wiki conflicts with the repository, Codex should trust the repository and repair the wiki.

How It Works

The project is inspired by Andrej Karpathy's LLM Wiki idea: raw sources stay authoritative while an LLM maintains a structured Markdown knowledge layer that becomes more useful over time.

code-wiki adapts that pattern to software development. The raw sources are the repository's code, tests, configuration, commands, dependencies, and documentation. The maintained knowledge layer is a wiki/ directory committed alongside the project.

This project is inspired by the LLM Wiki pattern; it is not an official, endorsed, or affiliated Karpathy project.

Default Workflow

For project-related work, the plugin should:

  1. Check whether the repository already has a code-wiki.
  2. Read the smallest set of relevant wiki pages.
  3. Use those pages to narrow source-code inspection.
  4. Complete the requested task and verify it against the repository.
  5. Update the wiki when durable project knowledge changed.
  6. Record stale, missing, or conflicting wiki context when discovered.

Basic Workflow

When a repository does not have a wiki yet, ask Codex to create one. Typical pages include:

wiki/
  index.md
  overview.md
  architecture.md
  commands.md
  testing.md
  modules/
    index.md
    <domain>.md
  log.md

After that, continue using Codex normally. The bootstrap skill routes each task to the reading, exploration, update, or audit workflow that fits the situation.

Skills

The plugin includes these skills:

Skill When to use
using-code-wiki Starts repository work, checks for wiki context, and coordinates the other skills.
creating-code-wiki Creates or substantially regenerates a repository wiki.
reading-code-wiki Reads minimal relevant wiki context before answering or editing.
exploring-code-with-wiki Uses wiki paths to narrow source-code inspection.
updating-code-wiki Updates durable wiki knowledge after project changes.
auditing-code-wiki Finds stale, vague, unsupported, or inconsistent wiki content.
writing-code-wiki-skills Helps extend or change the code-wiki skill set itself.

code-wiki is a workflow, not a replacement for reading code, a vector database, or a generic documentation generator.

Examples

See Basic workflow examples for more prompts and expected behavior.

Manual Skills Installation

The Codex plugin is the recommended installation method. If you use another compatible coding agent or prefer standalone skills, clone the repository and copy the individual skill directories into your agent's skill directory:

git clone https://github.com/mong3125/code-wiki.git
cd code-wiki
mkdir -p "${CODEX_HOME:-$HOME/.codex}/skills"
cp -R skills/* "${CODEX_HOME:-$HOME/.codex}/skills/"

Install all skills so using-code-wiki can route to the supporting workflows. The repository root itself is not a skill.

Manage The Codex Plugin

Update

Refresh the marketplace and reinstall the latest plugin version:

codex plugin marketplace upgrade code-wiki
codex plugin add code-wiki@code-wiki

Restart Codex and use a new thread after updating.

Remove

Remove the plugin and, if you no longer need it, its marketplace:

codex plugin remove code-wiki@code-wiki
codex plugin marketplace remove code-wiki

Removing the plugin does not delete any wiki/ directories created in your projects.

Troubleshooting

Confirm that Codex can see the marketplace and plugin:

codex plugin marketplace list
codex plugin list --available

If you installed or updated the plugin while Codex was running, restart Codex and begin a new thread so it can load the current skills.

Contributing

Contributions are welcome. See CONTRIBUTING.md for development setup, validation, and plugin packaging details.

License

MIT. See LICENSE.

About

Repository-local wiki workflows that help Codex and AI coding agents keep project context current.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors