How the Claude-Certification Skill Manages Persistent State in CLAUDE-CERTIFICATION.md

The claude-certification skill uses a single markdown file, CLAUDE-CERTIFICATION.md, as an append-only ledger that tracks the learner's entire certification journey through structured tables, enabling seamless session resumption and complete audit trails.

The claude-certification skill in the rohitg00/ai-engineering-from-scratch repository implements a robust persistent state management system that treats CLAUDE-CERTIFICATION.md as the single source of truth for learner progress. Unlike volatile memory-based approaches, this skill writes every lesson completion, quiz score, and assessment attempt to a plain markdown file, ensuring no progress is lost between sessions.

State File Lifecycle and Mode Detection

The skill determines its operating mode by checking for the existence of CLAUDE-CERTIFICATION.md in the workspace root. According to lines 20-22 of .claude/skills/claude-certification/SKILL.md, if the file exists, the skill immediately enters Lesson mode to continue existing progress; otherwise, it initializes Onboarding mode to guide new learners through track selection.

Initializing the State File

When a learner selects a certification track for the first time, the skill generates a fresh CLAUDE-CERTIFICATION.md using a structured template defined at line 108 of the skill definition. The skill populates this template by reading domain weights and lesson sequences from certifications/claude/tracks/*.json and policy data from certifications/claude/program.json:

template = """# My Claude Certification Path

<!-- Managed by the claude-certification skill.
     Repo: https://github.com/rohitg00/ai-engineering-from-scratch -->

## Goal

{goal}

## Active track

- Exam code: {exam_code}
- Track file: certifications/claude/tracks/{exam_code_lower}.json
- Started: {date}
- Pace: {hours_per_week}
- Diagnostic: not taken

## Route

| # | Lesson path | Domains | Status | Quiz | Evidence |

|---|-------------|---------|--------|------|----------|
{route_rows}

## Domain readiness

| Domain | Blueprint weight | Latest practice | Status |
|--------|------------------|-----------------|--------|
{domain_rows}

## Review queue

| Domain | Lesson path | Reason | Status |
|--------|-------------|--------|--------|
{review_rows}

## Assessment attempts

| Date | Assessment | Raw score | Conditions | Weak domains |
|------|------------|-----------|------------|--------------|
{attempt_rows}
"""
with open("CLAUDE-CERTIFICATION.md", "w") as f:
    f.write(template.format(...))

This template creates six distinct sections: Goal declaration, Active track metadata, Route progress table, Domain readiness matrix, Review queue, and Assessment attempts log.

Append-Only State Updates

The skill follows a strict append-only policy for all state modifications. As documented in lines 43-45 of SKILL.md, the system never overwrites existing rows or deletes historical data, preserving a complete forensic record of the learning journey.

Tracking Lesson Completion

After each lesson, the skill appends a new row to the Route table containing the lesson path, associated domains, completion status, quiz percentage, and evidence file path. This append operation uses Python file I/O to add lines without altering previous entries:

def append_route(lesson_path, domains, status, quiz_score, evidence_path):
    line = f"| {next_id} | {lesson_path} | {domains} | {status} | {quiz_score}% | {evidence_path} |\n"
    with open("CLAUDE-CERTIFICATION.md", "a") as f:
        f.write(line)

Recording Assessment History

Similarly, every assessment attempt generates a new entry in the Assessment attempts table (lines 63-65), capturing the date, raw score, testing conditions, and identified weak domains. This append-only approach maintains an immutable history of performance trends.

State Archiving and Reset Workflow

When a learner explicitly requests to restart their certification journey, the skill does not delete the existing state. Instead, following lines 67-69 of the skill definition, it archives the current file by renaming it to CLAUDE-CERTIFICATION-<exam-code>-<YYYY-MM-DD>.md, preserving all historical progress for future reference while clearing the workspace for a fresh start.

import datetime, shutil
archive_name = f"CLAUDE-CERTIFICATION-{exam_code}-{datetime.date.today()}.md"
shutil.move("CLAUDE-CERTIFICATION.md", archive_name)

Resuming Sessions from Persistent State

On subsequent invocations, the skill parses the stored markdown tables to reconstruct the learner's context. By reading the Route table, the skill identifies the next incomplete lesson; by analyzing the Domain readiness section, it calculates knowledge gaps; and by checking the Review queue, it surfaces pending reinforcement items. This parsing enables seamless continuation of the tutoring flow without requiring the learner to repeat previous steps.

Summary

  • The claude-certification skill treats CLAUDE-CERTIFICATION.md as the single source of truth for all learner progress.
  • Mode detection relies on file existence checks at lines 20-22 of .claude/skills/claude-certification/SKILL.md.
  • The skill employs an append-only update strategy that never deletes or modifies historical rows.
  • State archiving preserves previous attempts via timestamped file renaming rather than deletion.
  • Resume functionality parses markdown tables to restore exact session context and determine the next lesson.

Frequently Asked Questions

What triggers the creation of CLAUDE-CERTIFICATION.md?

The state file is created during the Onboarding mode workflow when a learner first selects a certification track. The skill populates the file using a template defined at line 108 of SKILL.md, which structures the document with sections for goals, active track metadata, and empty tables for route progress and assessment attempts.

Why does the skill use an append-only update strategy?

The append-only approach ensures forensic integrity of the learning journey. By never overwriting existing rows in the Route or Assessment tables (as specified in lines 43-45), the skill maintains a complete audit trail of every lesson attempt, quiz score, and performance metric, enabling longitudinal analysis of progress.

How does the skill handle restarting a certification track?

Rather than deleting existing state, the skill archives the current CLAUDE-CERTIFICATION.md by renaming it to include the exam code and current date (e.g., CLAUDE-CERTIFICATION-CLAUDE-101-2024-01-15.md). This archiving mechanism, defined at lines 67-69, preserves historical attempts while allowing a fresh state file to be generated for the new attempt.

What data structures are stored in the state file?

The markdown file contains five primary data structures: the Route table tracking lesson-by-lesson progress with quiz scores and evidence paths; the Domain readiness matrix mapping knowledge areas to current competency levels; the Review queue listing lessons requiring reinforcement; the Assessment attempts log recording exam scores and conditions; and metadata sections defining the active track and learner goals.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →