QDG KB updatewiki User Guide
Version 1 · Publish detailed Codex and Claude installation, troubleshooting, and testing guide
Historical versionQDG KB updatewiki User Guide
Purpose
The updatewiki skill lets a developer ask Codex or Claude Code to create, retrieve, and maintain
project documentation in QDG KB. Pages are stored as Markdown in the Odin qdgwiki database.
Every publication creates an immutable version with a change description, author, and optional
task or commit reference.
Installing the skill and connecting the MCP server are separate steps:
- The skill teaches the client how to interpret
updatewikirequests. - The QDG KB MCP server supplies the database tools used by the skill.
Both must be available. A visible skill without the MCP tools cannot update the knowledge base.
Prerequisites
- Windows PowerShell.
- Python 3.11 or newer, available through the
pylauncher. - Access to
C:\Users\Robert\Projects\QDG KBor another checkout of this repository. - Access to the Odin MySQL HA cluster and the
qdgwikischema. - A database configuration file. The default is
C:\Users\Robert\projects_config\db.json; setQDGKB_DB_JSONwhen using a different location. - Codex, Claude Code, or both.
Do not copy database credentials into the repository, a skill file, an MCP configuration checked into Git, or a prompt.
Prepare QDG KB
Open PowerShell and run:
Set-Location 'C:\Users\Robert\Projects\QDG KB'
powershell -ExecutionPolicy Bypass -File scripts\bootstrap.ps1
powershell -ExecutionPolicy Bypass -File scripts\migrate.ps1 status
powershell -ExecutionPolicy Bypass -File scripts\migrate.ps1 apply
powershell -ExecutionPolicy Bypass -File scripts\verify.ps1
Expected results:
bootstrap.ps1creates.venvand installs QDG KB in editable mode.migrate.ps1 statuslists database migrations and their state.migrate.ps1 applyreports applied migrations or that the schema is current.verify.ps1completes Ruff and pytest without errors.
If the database configuration is elsewhere, set it before running migrations or starting the client:
$env:QDGKB_DB_JSON = 'D:\secure\db.json'
Install for Codex
1. Install the skill
For every repository used by your Windows account:
Set-Location 'C:\Users\Robert\Projects\QDG KB'
powershell -ExecutionPolicy Bypass -File scripts\install-skill.ps1 -Target codex
This copies the skill to:
C:\Users\Robert\.agents\skills\updatewiki\SKILL.md
For QDG KB repository scope only:
powershell -ExecutionPolicy Bypass -File scripts\install-skill.ps1 `
-Target codex -Scope repository
Codex discovers repository skills under .agents\skills and personal skills under
%USERPROFILE%\.agents\skills. It normally detects changes automatically; restart Codex if the
skill does not appear.
2. Configure the MCP server
Add this to %USERPROFILE%\.codex\config.toml. Merge it with the existing file rather than
replacing other settings:
[mcp_servers.qdgkb]
command = "C:\\Users\\Robert\\Projects\\QDG KB\\.venv\\Scripts\\python.exe"
args = ["-m", "qdgkb"]
cwd = "C:\\Users\\Robert\\Projects\\QDG KB"
startup_timeout_sec = 20
When using a non-default database file, add only its path—not its credentials:
[mcp_servers.qdgkb.env]
QDGKB_DB_JSON = "D:\\secure\\db.json"
Restart Codex after changing MCP configuration. In the Codex desktop app, the equivalent setup is
under Settings > MCP servers: add an STDIO server named qdgkb with the Python executable and
arguments shown above, save, and restart.
3. Confirm Codex discovery
Start a new task and check:
/skills
/mcp
The skill list should include updatewiki. The MCP list should include qdgkb, with tools whose
names begin with kb_.
You can explicitly invoke the skill as $updatewiki, or use a natural request beginning with
updatewiki.
Install for Claude Code
1. Install the skill
For every repository used by your Windows account:
Set-Location 'C:\Users\Robert\Projects\QDG KB'
powershell -ExecutionPolicy Bypass -File scripts\install-skill.ps1 -Target claude
This copies the skill to:
C:\Users\Robert\.claude\skills\updatewiki\SKILL.md
For QDG KB repository scope only:
powershell -ExecutionPolicy Bypass -File scripts\install-skill.ps1 `
-Target claude -Scope repository
Claude Code discovers personal skills from ~/.claude/skills and project skills from
.claude/skills. Invoke this skill directly as /updatewiki. Claude may also select it when the
request matches its description.
2. Configure the MCP server
Run this as one PowerShell command:
claude mcp add qdgkb --scope user -- `
'C:\Users\Robert\Projects\QDG KB\.venv\Scripts\python.exe' -m qdgkb
Use --scope local instead of --scope user when it should apply only to the current project.
Avoid --scope project if the generated .mcp.json would expose a machine-specific path to other
developers.
If QDGKB_DB_JSON must be set explicitly:
claude mcp add qdgkb --scope user `
--env QDGKB_DB_JSON='D:\secure\db.json' -- `
'C:\Users\Robert\Projects\QDG KB\.venv\Scripts\python.exe' -m qdgkb
3. Confirm Claude discovery
Run:
claude mcp list
claude mcp get qdgkb
Then start Claude Code and use:
/mcp
/updatewiki find the QDG KB project overview
If the top-level ~/.claude/skills directory was created after Claude Code started, restart Claude
Code once. Edits inside an already discovered skill directory normally reload automatically.
Install for both clients
The skill-copy step can target both clients:
powershell -ExecutionPolicy Bypass -File scripts\install-skill.ps1 -Target all
MCP configuration remains client-specific. Configure Codex and Claude Code separately.
Test the complete workflow
Use a real, non-sensitive project that already exists in QDG KB. Begin with read-only tests.
Test 1: Server connection
Ask:
findwiki show the QDG KB overview
Pass condition: the client searches or retrieves the QDG KB project and reports its stored page.
Test 2: Skill activation
Ask without explicitly selecting the skill:
What does the QDG KB wiki say about installing updatewiki?
Pass condition: the client chooses the skill and uses QDG KB tools rather than guessing from model memory.
Test 3: Versioned write
Create a harmless Markdown file in a test project, then ask:
updatewiki notes with test-note.md
Pass condition: the response names the project and page, reports a new version, and gives a concise change description. Retrieve the page again and confirm the new text is present.
Test 4: Concurrency protection
This is normally covered by automated tests. If manually exercising it, update the same page using
an old expected_version. Pass condition: QDG KB rejects the stale write and asks the client to
reread and merge instead of overwriting the newer version.
Automated verification
From the repository:
powershell -ExecutionPolicy Bypass -File scripts\verify.ps1
To run the live Odin integration test deliberately:
$env:QDGKB_RUN_INTEGRATION = '1'
.\.venv\Scripts\python.exe -m pytest tests\integration\test_odin.py
The integration test creates temporary records and removes them afterward. Run it only when the
selected database configuration points to the intended qdgwiki schema.
Troubleshooting
The skill is not listed
- Confirm the file is exactly
...\updatewiki\SKILL.md, including capitalization. - Confirm user scope uses
%USERPROFILE%\.agents\skillsfor Codex or%USERPROFILE%\.claude\skillsfor Claude Code. - Check that the YAML frontmatter begins and ends with
---. - Restart the client if the top-level skill directory was newly created.
- In Codex, make sure the skill is not disabled in
~/.codex/config.toml. - In Claude Code, inspect
/skillsand anyskillOverridesin.claude/settings.local.json.
The skill is visible but no kb_ tools exist
The MCP server is missing, disabled, or failed to start. Check /mcp, verify the executable path,
and run the server directly:
& 'C:\Users\Robert\Projects\QDG KB\.venv\Scripts\python.exe' -m qdgkb
An STDIO server waits silently for protocol input. If it exits immediately, inspect the displayed
error. Press Ctrl+C to stop a healthy waiting process.
Database connection fails
- Confirm the JSON file exists and is valid JSON.
- Confirm the account can reach Odin through the required network or VPN.
- Confirm the database account can use the
qdgwikischema. - Run
scripts\migrate.ps1 statusto separate database problems from client configuration. - Do not paste the JSON contents into a prompt or log.
No module named qdgkb
Run scripts\bootstrap.ps1 again. Ensure the MCP command uses the repository's .venv Python,
not a different system Python.
MCP startup times out
- Increase Codex
startup_timeout_secabove 20 when the drive or network is slow. - In Claude Code, increase
MCP_TIMEOUTbefore launching Claude. - Test database connectivity with
scripts\migrate.ps1 status.
A page update reports a version conflict
This is expected concurrency protection. The skill should reread the current page, merge both changes, and retry once. If the two changes disagree semantically, it should ask a developer which content is authoritative.
A Markdown update is rejected
QDG KB rejects empty pages, content larger than 2 MB, unclosed fenced code blocks, and content that resembles a credential or private key. Fix the Markdown rather than disabling validation.