用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/majiayu000/claude-skill-registry --skill gemma-noise-detector-prototype命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | gemma_noise_detector_prototype |
| description | Gemma Noise Detector (Prototype) |
| version | 1 |
| author | 0102_wre_team |
| agents | ["gemma"] |
| dependencies | ["pattern_memory","libido_monitor"] |
| domain | autonomous_operations |
skill_id: gemma_noise_detector_v1_prototype name: gemma_noise_detector description: Fast binary classification of files as noise/signal (JSONL, temp, rotting data) version: 1.0_prototype author: qwen_baseline_generator created: 2025-10-22 agents: [gemma] primary_agent: gemma intent_type: CLASSIFICATION promotion_state: prototype pattern_fidelity_threshold: 0.90 test_status: needs_validation
mcp_orchestration: true breadcrumb_logging: true owning_dae: doc_dae execution_phase: 1 next_skill: qwen_cleanup_strategist_v1_prototype
inputs:
dependencies: data_stores: [] mcp_endpoints: - endpoint_name: holo_index methods: [semantic_search] throttles: [] required_context: - file_path: "Absolute path to file being classified" - file_extension: "File extension (.json, .jsonl, .md, .log, etc.)" - file_size_bytes: "Size of file in bytes" - last_modified_days: "Days since last modification" - parent_directory: "Directory containing the file"
Purpose: Fast binary classification of codebase files into "noise" (clutter) or "signal" (valuable) categories
Intent Type: CLASSIFICATION
Agent: gemma (270M, 50-100ms inference)
You are Gemma, a fast binary classifier. Your job is to analyze individual files and label them as either NOISE (files that clutter the codebase) or SIGNAL (files that provide value). You do NOT make cleanup decisions - you only label files with high confidence.
Key Constraint: You are a 270M parameter model optimized for SPEED and SIMPLE PATTERN MATCHING. You cannot perform complex reasoning or strategic planning. You classify files based on explicit rules.
Rule: IF file_extension in NOISE_EXTENSIONS THEN label="noise", category="file_type_noise"
NOISE_EXTENSIONS:
.jsonl (unless in critical paths: data/, modules/*/telemetry/).tmp, .temp, .bak, .backup.log (unless in logs/, modules/*/logs/).cache, .pyc, __pycache__/.swp, .swo, .DS_Store, Thumbs.dbExpected Pattern: extension_check_executed=True
Steps:
file_extension from context{"label": "noise", "category": "file_type_noise", "confidence": 0.95}{"pattern": "extension_check_executed", "value": true, "extension": file_extension}Examples:
chat_history_20251015.jsonl → NOISE (jsonl outside critical paths)debug.log.tmp → NOISE (temp file)data/foundup.db → SIGNAL (database in critical path)README.md → SIGNAL (documentation)Rule: IF file_extension in ['.jsonl', '.log', '.json'] AND last_modified_days > 30 AND file_size_bytes > 1_000_000 THEN label="noise", category="rotting_data"
Expected Pattern: age_check_executed=True
Steps:
file_extension in ['.jsonl', '.log', '.json']last_modified_days > 30file_size_bytes > 1_000_000 (1MB){"label": "noise", "category": "rotting_data", "confidence": 0.85}{"pattern": "age_check_executed", "value": true, "age_days": last_modified_days, "size_bytes": file_size_bytes}Examples:
old_chat_log_20250915.jsonl (45 days old, 2MB) → NOISErecent_telemetry.jsonl (5 days old, 500KB) → SIGNALarchive/legacy_data.json (60 days old, 500 bytes) → SIGNAL (small, likely intentional archive)Rule: IF filename contains ['backup', 'bak', 'copy', 'old', 'temp_'] THEN label="noise", category="backup_file"
Expected Pattern: backup_check_executed=True
Steps:
file_path['backup', '_bak', 'copy', 'old_', 'temp_']{"label": "noise", "category": "backup_file", "confidence": 0.90}{"pattern": "backup_check_executed", "value": true, "filename": filename}Examples:
main.py.backup → NOISEold_config.json → NOISEtemp_analysis.md → NOISEmain.py → SIGNALconfig.json → SIGNALRule: IF parent_directory in NOISE_DIRECTORIES THEN label="noise", category="noise_directory"
NOISE_DIRECTORIES:
__pycache__/.git/ (unless .git/config or .git/hooks/)node_modules/.cache/temp/, tmp/backups/archive/ (unless explicitly needed)Expected Pattern: directory_check_executed=True
Steps:
parent_directory from file_path{"label": "noise", "category": "noise_directory", "confidence": 0.95}{"pattern": "directory_check_executed", "value": true, "parent_dir": parent_directory}Examples:
__pycache__/module.cpython-39.pyc → NOISEtemp/scratch_work.txt → NOISEsrc/main.py → SIGNALdocs/README.md → SIGNALRule: IF file_path matches CRITICAL_PATHS THEN label="signal", category="critical_file" (OVERRIDE all previous noise labels)
CRITICAL_PATHS:
data/foundup.db (SQLite database)modules/*/src/*.py (source code)modules/*/tests/*.py (test files)WSP_framework/src/*.md (WSP protocols)*.md (documentation - README, INTERFACE, ModLog, CLAUDE)requirements.txt, pyproject.toml, setup.py.env (credentials - DO NOT DELETE)holo_index/, main.py, NAVIGATION.pyExpected Pattern: critical_path_check_executed=True
Steps:
file_path matches any CRITICAL_PATHS pattern{"label": "signal", "category": "critical_file", "confidence": 1.0} (OVERRIDE previous label){"pattern": "critical_path_check_executed", "value": true, "is_critical": bool}Examples:
data/foundup.db → SIGNAL (even if large/old)modules/communication/livechat/src/chat_sender.py → SIGNALREADME.md → SIGNALtemp/debug.log → NOISE (not in critical paths)Rule: IF no previous checks matched THEN label="signal", category="unknown_keep_safe", confidence=0.5
Expected Pattern: default_classification_executed=True
Steps:
{"pattern": "default_classification_executed", "value": true}{"label": "signal", "category": "unknown_keep_safe", "confidence": 0.5}Examples:
unknown_file.xyz → SIGNAL (unknown, keep safe)custom_script.sh → SIGNAL (unknown, keep safe)Pattern fidelity scoring expects these patterns logged after EVERY execution:
{
"execution_id": "exec_gemma_001",
"file_path": "/path/to/file.ext",
"patterns": {
"extension_check_executed": true,
"age_check_executed": true,
"backup_check_executed": true,
"directory_check_executed": true,
"critical_path_check_executed": true,
"default_classification_executed": false
},
"label": "noise",
"category": "file_type_noise",
"confidence": 0.95,
"execution_time_ms": 45
Fidelity Calculation: (patterns_executed / 6) - All 6 checks should run every time
Format: JSON Lines (JSONL) appended to labels.jsonl + autonomous cleanup script
Schema:
{
"execution_id": "exec_gemma_001",
"timestamp": "2025-10-22T01:59:00Z",
"file_path": "O:/Foundups-Agent/temp/debug.log",
"file_extension": ".log",
"file_size_bytes": 1500000,
"last_modified_days": 45,
"parent_directory": "temp/",
"label": "noise",
"category": "rotting_data",
"confidence": 0.85,
"cleanup_priority_mps": {
"complexity": 1,
"complexity_reason": "Trivial - simple file deletion",
"importance": 2,
"importance_reason"
Autonomous Cleanup Script (Generated after classification):
#!/bin/bash
# Auto-generated cleanup script from gemma_noise_detector
# Execution ID: exec_gemma_001
# Generated: 2025-10-22T01:59:00Z
set -e # Exit on error
echo "=== Gemma Noise Detector Cleanup ==="
echo "Total files classified: 25"
echo "Noise files (safe to delete): 18"
echo "Signal files (keep): 7"
echo ""
# P3 Low Priority Cleanup (Autonomous - No Approval Required)
echo "[1/18] Deleting temp/debug.log (MPS: 5, rotting_data)..."
rm "O:/Foundups-Agent/temp/debug.log"
test ! -f "O:/Foundups-Agent/temp/debug.log" && echo "✓ Verified" || echo "✗ Failed"
# ... (repeat for other noise files)
echo ""
echo "=== Cleanup Complete ==="
echo "Files deleted: 18/18"
echo "Disk space freed: 45MB"
echo "Verification: All deletions confirmed"
Destination Files:
data/gemma_noise_labels.jsonl - Classification resultsdata/autonomous_cleanup_script.sh - Executable cleanup scriptchat_history.jsonl (not in data/) → Expected: {"label": "noise", "category": "file_type_noise", "confidence": 0.95} (Reason: JSONL outside critical path)data/foundup_telemetry.jsonl → Expected: {"label": "signal", "category": "critical_file", "confidence": 1.0} (Reason: Critical path override)debug.log (not in logs/) → Expected: {"label": "noise", "category": "file_type_noise", "confidence": 0.95} (Reason: Log file outside critical path)modules/livechat/logs/daemon.log → Expected: {"label": "signal", "category": "critical_file", "confidence": 1.0} (Reason: Logs in module)temp_analysis.tmp → Expected: {"label": "noise", "category": "file_type_noise", "confidence": 0.95} (Reason: Temp file)config.json.bak → Expected: {"label": "noise", "category": "file_type_noise", "confidence": 0.95} (Reason: Backup file)__pycache__/module.pyc → Expected: {"label": "noise", "category": "file_type_noise", "confidence": 0.95} (Reason: Cache file).DS_Store → Expected: {"label": "noise", "category": "file_type_noise", "confidence": 0.95} (Reason: System file)README.md → Expected: {"label": "signal", "category": "critical_file", "confidence": 1.0} (Reason: Markdown docs)main.py → Expected: {"label": "signal", "category": "critical_file", "confidence": 1.0} (Reason: Source code)old_chat.jsonl (60 days, 2MB) → Expected: {"label": "noise", "category": "rotting_data", "confidence": 0.85} (Reason: Old + large JSONL)recent_log.jsonl (5 days, 500KB) → Expected: {"label": "signal", "category": "unknown_keep_safe", "confidence": 0.5} (Reason: Recent, small)ancient_archive.json (90 days, 3MB) → Expected: {"label": "noise", "category": "rotting_data", "confidence": 0.85} (Reason: Old + large JSON)archive/legacy.json (100 days, 500 bytes) → Expected: {"label": "signal", "category": "unknown_keep_safe", "confidence": 0.5} (Reason: Small, likely intentional)data/foundup.db (120 days, 50MB) → Expected: {"label": "signal", "category": "critical_file", "confidence": 1.0} (Reason: Critical path override)main.py.backup → Expected: {"label": "noise", "category": "backup_file", "confidence": 0.90} (Reason: Backup suffix)old_config.json → Expected: {"label": "noise", "category": "backup_file", "confidence": 0.90} (Reason: "old_" prefix)temp_script.sh → Expected: {"label": "noise", "category": "backup_file", "confidence": 0.90} (Reason: "temp_" prefix)module_copy.py → Expected: {"label": "noise", "category": "backup_file", "confidence": 0.90} (Reason: "copy" suffix)config.json → Expected: {"label": "signal", "category": "unknown_keep_safe", "confidence": 0.5} (Reason: No backup pattern)__pycache__/module.cpython-39.pyc → Expected: {"label": "noise", "category": "noise_directory", "confidence": 0.95} (Reason: Pycache dir)temp/scratch.txt → Expected: {"label": "noise", "category": "noise_directory", "confidence": 0.95} (Reason: Temp dir)backups/old_data.json → Expected: {"label": "noise", "category": "noise_directory", "confidence": 0.95} (Reason: Backups dir)src/module.py → Expected: {"label": "signal", "category": "critical_file", "confidence": 1.0} (Reason: Source directory)docs/guide.md → Expected: {"label": "signal", "category": "critical_file", "confidence": 1.0} (Reason: Docs directory)data/foundup.db → Expected: {"label": "signal", "category": "critical_file", "confidence": 1.0} (Reason: Database)modules/livechat/src/chat_sender.py → Expected: {"label": "signal", "category": "critical_file", "confidence": 1.0} (Reason: Module source)WSP_framework/src/WSP_96.md → Expected: {"label": "signal", "category": "critical_file", "confidence": 1.0} (Reason: WSP protocol)requirements.txt → Expected: {"label": "signal", "category": "critical_file", "confidence": 1.0} (Reason: Python deps).env → Expected: {"label": "signal", "category": "critical_file", "confidence": 1.0} (Reason: Credentials - never delete)Total: 30 test cases across 5 categories
Pattern Extraction from Classification Run:
{
"execution_summary": {
"total_files_classified": 25,
"noise_files": 18,
"signal_files": 7,
"average_confidence": 0.88,
"execution_time_total_ms": 1300
},
"classification_accuracy": {
"extension_check": {"accuracy": 0.95, "false_positives": 1, "false_negatives": 0},
"age_check": {"accuracy": 0.85, "false_positives": 2, "false_negatives": 1
First Principles Additions:
NEVER CLASSIFY AS NOISE:
.env files (credentials)data/foundup.db (SQLite database)modules/*/src/*.py (source code)WSP_framework/src/*.md (WSP protocols)requirements.txt, pyproject.toml, setup.pyWhen in doubt → SIGNAL (safe default)
After 100 executions with ≥90% fidelity:
labels.jsonl for strategic cleanup planning