Maintenance logo

Maintenance

CommunityPopular
platonai
maintenance

Orchestrates 30 check scripts across 9 categories (code, tests, docs, SKILLs, deps, infra). Use when asked to run maintenance, check quality, verify docs, audit SKILLs, or clean up artifacts.

Overview

Publisherplatonai
RepositoryBrowser4
Skill namemaintenance
Stars
1.2K
Forks
152
Bundled files
Instructions only
LicenseApache-2.0
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 platonai on GitHub. Read the source before you install it.

Installation

Install the Maintenance 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.
    https://github.com/platonai/Browser4/tree/main/coworker/skills/maintenance
  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/platonai/Browser4.git /tmp/Browser4
mkdir -p .claude/skills
cp -r /tmp/Browser4/coworker/skills/maintenance .claude/skills/maintenance
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Maintenance 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 Maintenance 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 Maintenance 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.

Maintenance

A config-driven, cross-platform maintenance system that periodically verifies code quality, document correctness, and SKILL documentation AI-friendliness. The orchestrator reads bin/maintenance/config.psd1, runs check scripts on a schedule, persists results to shared state, and reports through multiple formatters (console, JSON, markdown, GitHub annotations).

When to Use

  • "run maintenance"
  • "run CI checks" / "run nightly checks"
  • "check code quality"
  • "verify SKILL frontmatter"
  • "audit documentation links"
  • "check for dead code"
  • "run coverage check"
  • "clean up build artifacts"
  • "add a new maintenance check"
  • "force-run all maintenance tasks"
  • "check the maintenance state"

How It Works

The orchestrator (bin/maintenance/orchestrator.ps1) is the central entry point. It reads task definitions from config.psd1, checks the shared state file to avoid redundant re-runs (unless -Force), executes each task with the configured interval, collects result objects, and routes them through reporters.

Result object contract — every check script emits a PSCustomObject:

powershell
@{
    CheckId    = "A1"
    Name       = "Compilation Check"
    Status     = "passed"  # passed | failed | skipped | error
    DurationMs = 1234
    ExitCode   = 0
    Details    = "Maven + Cargo compile OK"
    Results    = @( @{ Item="..."; Status="passed"; Message="..." } )
    Artifacts  = @( "bin/maintenance/logs/A1-20260714.json" )
    Timestamp  = "2026-07-14T14:30:22Z"
}

Usage

All commands are run from the repository root.

Orchestrator (primary entry point)

bash
# One pass (run pending tasks, skip if still within interval)
pwsh bin/maintenance/orchestrator.ps1 -Once

# Continuous loop (dev mode — warn only, never fails)
pwsh bin/maintenance/orchestrator.ps1

# Force all tasks regardless of last-run state
pwsh bin/maintenance/orchestrator.ps1 -Force -Once

# CI mode (strict — first failure exits 1)
MAINTENANCE_MODE=ci pwsh bin/maintenance/orchestrator.ps1 -Once

# Nightly mode (collects all failures, reports at end)
MAINTENANCE_MODE=nightly pwsh bin/maintenance/orchestrator.ps1 -Once

CI entry points

bash
# Per-commit safety checks (fast)
pwsh bin/maintenance/ci/invoke-ci-checks.ps1

# Full nightly suite (thorough)
pwsh bin/maintenance/ci/invoke-nightly-checks.ps1

Running individual checks

bash
# Syntax-check all PS1 scripts
pwsh bin/maintenance/checks/check-ps1-syntax.ps1

# Validate SKILL.md YAML frontmatter
pwsh bin/maintenance/checks/check-skill-frontmatter.ps1

# Validate internal doc links
pwsh bin/maintenance/checks/check-doc-links-internal.ps1

# Check version consistency across files
pwsh bin/maintenance/checks/check-version-consistency.ps1

# Run code coverage check
pwsh bin/maintenance/checks/check-coverage.ps1

# Detect dead code
pwsh bin/maintenance/checks/check-dead-code.ps1

# Clean stale build artifacts (dry-run first)
pwsh bin/maintenance/checks/clean-build-artifacts.ps1

Execution Modes

ModeBehaviorTrigger
ciStrict: any failure exits 1 immediately. Implies -Force.MAINTENANCE_MODE=ci
nightlyRelaxed: collects all failures, reports at end.MAINTENANCE_MODE=nightly
devWarn only: never fails; all issues are warnings.Default

Check Categories

IDCategoryCountFrequency
ACode Quality & Correctness7CI + Nightly + Weekly
BTest Health4CI + Nightly + Weekly
CDocumentation4CI + Nightly + Hourly
DSKILL Documentation3CI + Nightly + Weekly
EVersion & Release3CI + Nightly + Release
FDependency Management3Nightly + Weekly
GInfrastructure Health3CI + Nightly
HOperational Health3Nightly + Weekly
IAI-Assisted Quality2On-demand + Scheduled

Complete Check Inventory

ScriptCategoryIntervalDescription
check-compilation.ps1A5 minMaven + Cargo compilation
check-fast-tests.ps1B10 minFast JUnit unit tests
check-rust-cli.ps1A1 hrcargo test + cargo clippy
check-doc-links-internal.ps1C1 hrInternal documentation links
check-skill-frontmatter.ps1D1 hrSKILL.md YAML frontmatter
check-version-consistency.ps1E1 hrVersion alignment across files
check-ps1-syntax.ps1A1 hrParse all PS1 for syntax errors
check-dockerfile.ps1G1 hrDocker image builds
check-coverage.ps1B24 hrCode coverage vs thresholds
check-test-tags.ps1B24 hrJUnit test tag taxonomy
check-skill-structure.ps1D24 hrSKILL.md section structure
check-dependency-vulns.ps1F24 hrCVE vulnerability scan
check-maven-deps.ps1F24 hrMaven dependency convergence
check-cargo-audit.ps1F24 hrRust cargo audit
check-doc-links-external.ps1C24 hrExternal URL validation
check-bilingual-readme.ps1C24 hrREADME.md ↔ README.zh.md
check-log-sizes.ps1H24 hrLog directory size audit
check-deprecated-apis.ps1A7 daysDeprecated API usage
check-dead-code.ps1A7 daysDead code and unused imports
check-skill-ai-quality.ps1D7 daysSKILL.md AI quality assessment
check-license-compliance.ps1E7 daysDependency license compatibility
clean-build-artifacts.ps1H7 daysRemove stale build artifacts
clean-temp-files.ps1H7 daysRemove stale temp/lock files

Additional on-demand checks not in the default config: check-changelog-staleness.ps1, check-ci-workflows.ps1, check-e2e-tests.ps1, check-integration-tests.ps1, check-qodana.ps1, check-readme-staleness.ps1, check-release-assets.ps1.

Shared State

The orchestrator persists run history to bin/maintenance/state/maintenance-state.json, which is tracked in git so the whole team shares one view.

How skip logic works: A task is skipped if it ran within its configured IntervalSeconds. This means CI nightly running check-coverage prevents a developer's orchestrator from re-running it within 24 hours. Force mode (-Force) or CI mode bypass this entirely.

File locking prevents corruption when two processes write simultaneously. Stale locks (older than 60 seconds) are automatically broken.

Thresholds

All numeric thresholds live in bin/maintenance/thresholds/thresholds.psd1. Override any value via environment variable:

bash
MAINTENANCE_Coverage_Global=0.75 pwsh bin/maintenance/orchestrator.ps1 -Once
MAINTENANCE_LogHealth_MaxTotalMB=200 pwsh bin/maintenance/orchestrator.ps1 -Once

Adding a New Check

  1. Create bin/maintenance/checks/check-my-thing.ps1 following the result object contract
  2. Add a task entry to bin/maintenance/config.psd1 with Name, Description, Enabled, IntervalSeconds, ScriptPath
  3. If it's a CI-level check, add it to bin/maintenance/ci/invoke-ci-checks.ps1
  4. If it's a nightly check, add it to bin/maintenance/ci/invoke-nightly-checks.ps1

Reporters

ScriptOutput
reporters/report-console.ps1Colorized terminal output
reporters/report-json.ps1JSON files under logs/
reporters/report-github-annotations.ps1CI workflow commands
reporters/report-summary.ps1Markdown summary

Directory Layout

bin/maintenance/
├── config.psd1              # Task definitions and intervals
├── orchestrator.ps1         # Master scheduler
├── common/
│   ├── MaintenanceUtil.ps1  # Logging, results, threshold helpers
│   └── MaintenanceState.ps1 # State I/O with file locking
├── checks/                  # 30 check/clean scripts
├── reporters/               # Output formatters
├── ci/                      # CI entry points
├── state/
│   └── maintenance-state.json  # Shared run history (git-tracked)
└── thresholds/
    └── thresholds.psd1      # Numeric thresholds

Dependencies

  • PowerShell Core 6+ (pwsh)
  • Git (repository root resolution)
  • Maven Wrapper (mvnw / mvnw.cmd)
  • Cargo (Rust CLI checks)
  • Docker (Qodana, integration tests, Dockerfile checks)
  • Python 3 (bin/quality/fix-links.py)
  • ripgrep (rg) recommended for fast content search

Frequently asked questions

What does the Maintenance AI skill do?

Orchestrates 30 check scripts across 9 categories (code, tests, docs, SKILLs, deps, infra). Use when asked to run maintenance, check quality, verify docs, audit SKILLs, or clean up artifacts.

Why use Maintenance on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/platonai/Browser4/tree/main/coworker/skills/maintenance. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Maintenance?

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 Maintenance?

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

Is the Maintenance AI skill free?

Yes. It is published on GitHub by platonai under the Apache-2.0 license. 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 👇