uzomuzo-oss: Command for GitHub Copilot

.github/prompts/deadcode.prompt.md

deadcode is a command for GitHub Copilot from future-architect/uzomuzo-oss. It costs 21 tokens per session (996 once invoked), scanned A, original, Apache-2.0.

A Go code-analysis command that finds code which is no longer used, such as unused functions, types, variables, or packages. It can report findings or remove confirmed groups after asking for approval.

In plain words
What is it for?
Use it to audit the whole Go project or a package, run compiler and dependency checks, and optionally remove confirmed dead code.
Why use it?
Unused code increases maintenance cost and can hide obsolete dependencies or unfinished cleanup.

Command for GitHub Copilot

Written for GitHub Copilot: a Copilot chat mode or prompt.

This is future-architect/uzomuzo-oss's own configuration. It tells GitHub Copilot how to work on uzomuzo-oss itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything uzomuzo-oss configures →

Reuse

Borrowing it

Nothing to install: this file belongs to future-architect/uzomuzo-oss. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/future-architect/uzomuzo-oss/main/.github/prompts/deadcode.prompt.md
Clone the repo
git clone --depth 1 https://github.com/future-architect/uzomuzo-oss

Made for: GitHub Copilot.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for deadcode

README.md
[![agentmods](https://agentmods.dev/badge/commands/future-architect/uzomuzo-oss/deadcode/github.svg)](https://agentmods.dev/commands/future-architect/uzomuzo-oss/deadcode)
Your own site
<a href="https://agentmods.dev/commands/future-architect/uzomuzo-oss/deadcode"><img src="https://agentmods.dev/badge/commands/future-architect/uzomuzo-oss/deadcode/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for deadcode

Your own site · 80×15
<a href="https://agentmods.dev/commands/future-architect/uzomuzo-oss/deadcode"><img src="https://agentmods.dev/badge/commands/future-architect/uzomuzo-oss/deadcode.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 996 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00021 $0.00996
Opus 5.5 $0.00008 $0.00398
Sonnet 5.5 $0.00004 $0.00199
Haiku 4.5 $0.00002 $0.00100

Measured 1mo ago against content hash 55809e59da56, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deadcode scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.github/prompts/deadcode.prompt.md · 114 lines

How it starts

The opening of the file, as written. The whole thing — 114 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/deadcode — Dead Code Detection & Removal

You are performing dead code analysis on this Go codebase.

Mode

Parse the user's arguments to determine the mode:

  • No arguments or audit: Detection only. Report findings, do not modify code.
  • fix: Detection + interactive removal. Ask for confirmation before each batch.
  • <path>: Scope detection to a specific package path (e.g., /deadcode internal/infrastructure/).
  • fix <path>: Scoped fix mode.

Detection Procedure

Run these steps in order and collect all results:

Step 1: Compiler-Level Checks

go vet ./... 2>&1
go build ./... 2>&1

Step 2: Unused Module Dependencies

go mod tidy -v 2>&1 | grep "unused"

Step 3: Dead Code Tool

deadcode ./... 2>/dev/null || echo "NOTICE: deadcode not installed. Install with: go install golang.org/x/tools/cmd/deadcode@latest"

If deadcode is not available, fall back to manual detection in Step 4.

Step 4: Manual Detection

Search for unexported symbols with zero callers:

  1. Find unexported function/method definitions (func lowerCase...)
  2. Grep for each symbol across the entire codebase
  3. If only referenced in its own definition (and optionally its own _test.go), flag it
  4. Check for exported symbols in internal/ packages that have no importers

When scoped to a path, only scan definitions in that path but still check references globally.

Classification

Categorize every finding into exactly one category:

Category Criteria Action
SAFE Unexported, zero references outside definition file, no reflection/generate/linkname usage Remove immediately (in fix mode)
CAREFUL Exported but internal (not in pkg/uzomuzo/), test-only references, or part of an interface impl Remove after confirming no downstream impact
RISKY Part of pkg/uzomuzo/ public API, used via reflect, or unclear reference chain Report only, never auto-remove

Read the full file on GitHub · 114 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 114 lines · 21 tokens per session scan A 55809e59da56

Subscribe to this mod's changes

deadcode is a command published in the GitHub repository future-architect/uzomuzo-oss (42 stars, last pushed today), licensed Apache-2.0. It adds 21 tokens to every session and 996 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-07.