AGENT SKILL

review-results

暂无简介

License 许可
MIT
所属仓库
rootazero/Aleph
最近更新
2026-11-12
Stars
★ 4
Forks
1

02 资源文件 156

03 SKILL.md 正文


Module: skill

Summary

  • Files reviewed: 12
  • Issues found: 4
  • Issues fixed: 4

Fixes

  1. [mod.rs:136-181] DRY violation — init() and rebuild() duplicated scan logic → Extracted common logic into private rescan_dirs() method. Both init() and rebuild() now delegate to it.

  2. [mod.rs:221-273] Non-deterministic iteration — skill_status() and full_status() returned HashMap-order results → Added .sort_by(|a, b| a.id.as_str().cmp(b.id.as_str())) to both methods for deterministic UI/API output.

  3. [installer.rs:14-18] Security — incomplete command injection denylist → Replaced denylist (!contains(';') etc.) with strict allowlist: only [a-zA-Z0-9\-_./:@+=~] are permitted. This blocks spaces, quotes, redirections, backticks, $(), and all other shell metacharacters. Added 2 tests covering malicious and legitimate package names.

  4. [commands.rs:40-46] Non-deterministic iteration — resolve_command() name-match used arbitrary HashMap order → Collects all matching candidates, sorts by priority descending (then by id for tie-breaking), and picks the best match. Ensures workspace skills consistently override bundled skills with the same command name.

Notes

  • UTF-8 safety: split_frontmatter() uses byte indexing (trimmed[3..], rest[..closing_pos]), but all delimiter patterns (---, \n) are single-byte ASCII, so the indices always land on valid UTF-8 boundaries. No fix needed.
  • Lock safety: All locks are tokio::sync::RwLock (no poison), used correctly with .await. No std::sync::Mutex present.
  • No unwrap() on user-facing paths in production code. All unwrap() calls are confined to test code.
  • Architecture compliance: Module follows P1 (low coupling via traits), P2 (high cohesion — each file has single responsibility), P6 (simplicity), and R9 (tool-oriented design). No violations found.
  • The pre-existing compile error in agent_init.rs:177 is unrelated to this module.

04 同仓库更多 Skills

rootazero
rootazero/Aleph

invalid-yaml

暂无简介

★ 4
rootazero
rootazero/Aleph

gh-pr-docker

GitHub PR operations (Aleph enhanced with Docker)

运维与部署
★ 4
rootazero
rootazero/Aleph

echo-basic

Basic echo command (frontmatter smoke fixture)

★ 4
rootazero
rootazero/Aleph

review-results

暂无简介

★ 4
rootazero
rootazero/Aleph

severed-wire-audit

Find and resolve "severed wires" in a codebase — a producer and a consumer both exist and are fully implemented, but the connecting registration / dispatch arm / event subscription / call site between them is missing, so a feature looks broken though both ends are done. dead-code lints CANNOT catch this: the producer isn't dead (it has tests) and the consumer connects to a stub or reads an inert config. Use when a feature "looks unwired / 没接上 / 两端都在但连线断 / 明明写了却调不到"; after a refactor or middleware removal, to verify producers still reach consumers; when asked to "审接缝 / 找断线 / seam audit / wire audit / connection audit"; or when a method returns NOT_FOUND, a tool the model can't call, an event that never fires, or a config field nothing reads. Triages each finding into CONNECT (fix the wire) / CUT (delete the dead abstraction) / DECIDE (ask the human), enforces read-before-write so dead scaffolding is deleted not reconnected, and installs a grep-diff guard against regression.

★ 4
rootazero
rootazero/Aleph

rust-occams-razor

Use when refactoring, simplifying, reviewing, or decomposing an existing Rust codebase while preserving observable behavior, public contracts, concurrency semantics, and performance characteristics.

★ 4