Skip to content

K-Dense-AI/scientific-agent-skills / skills/treatment-plans

treatment-plans

Verified

Formats and structurally validates local treatment-plan documentation after clinical decisions have already been supplied and verified by authorized licensed professionals. Use for source traceability, clinician-authored intervention records, goals and checkpoints, shared-decision records, reconciliation handoffs, and release gates—not for clinical decision-making.

references/security_validation.md

View on GitHub
# Security Validation Record

Historical validation date: **2026-07-23**. Current local review: **2026-10-01**.

## Current refresh

- Read all six JSON templates, eight helpers, and all references. Kept the documentation-only scope and schema version `2.0`; bumped skill metadata to `2.4`.
- Refreshed official-source content, dates, redirects, and program applicability; see `source_ledger.md`. HTTP success alone was not treated as source validation.
- Fixed malformed enum collections, deeply nested JSON and oversized integer parser failures, whitespace-only required strings, unknown-key/document-type leakage into reports, and broader-than-documented timestamp/date-filter acceptance.
- Schedule generation now rejects cross-record inconsistencies before extracting dates. It preserves local calendar dates, not a converted timezone.
- Replaced overwrite-capable publication with hard-link publication; a competing destination is preserved and temporary files are cleaned. Unsupported filesystems fail. A package is still not a transaction, and local-path checks are not a filesystem sandbox.
- Replaced the misleading readiness output with `documentation_declarations_complete` and explicit `handoff_authorized_by_script: false`.
- Agent Skills validator: **PASS**. Isolated Python 3.13.3 suite: **29 passed**. Standard-library CLI smoke: **20 invocations passed**, including all seven help paths, deliberately incomplete templates, complete synthetic records, existing-output refusal, malformed enum input, and strict filters. **8 scripts parsed**; generated schedule contained exactly **7 supplied-date events**; local POSIX output modes checked.
- No patient data, clinical judgment, signature authentication, licensure, de-identification, live EHR integration, external reporting, Windows ACL behavior, or clinical validity was tested. Six JSON templates require no LaTeX/PDF compilation.
- The aggregate repository security scan is coordinated separately. The scanner results below describe the historical July redesign, not a fresh scan of version 2.4.

## Historical redesign evidence

## Baseline

The repository `SECURITY.md` entry recorded **11 findings** with maximum severity **CRITICAL**:

- three CRITICAL cross-file/environment/network exfiltration findings;
- one HIGH API-key transmission finding;
- five MEDIUM findings involving environment harvesting, command chaining, and mandatory external-tool behavior;
- two LOW findings involving unsafe template content and unpinned dependencies.

The affected files included the former `generate_schematic.py`, `generate_schematic_ai.py`, `SKILL.md`, and `medical_treatment_plan.sty`.

## Remediation

- Deleted both schematic-generation scripts.
- Removed network requests, API keys, environment access, `.env` loading, subprocesses, external models, image generation, and cross-skill calls.
- Deleted the hardcoded LaTeX style and all specialty templates containing clinical treatment content.
- Replaced them with generic, fail-closed JSON records.
- Rebuilt every remaining script as a dependency-free, bounded, deterministic local JSON helper.
- Added strict duplicate-key, schema, unknown-field, collection, depth, path, symlink, and output controls.
- Added minimized reports that do not echo clinician-authored content.
- Added AST tests prohibiting network libraries, dynamic execution, executable serialization, subprocesses, and environment access.

## Historical validation results

- Agent Skills reference validator: **PASS**
- Dependency-free CLI help checks: **PASS**
- Synthetic standard-library tests: **21 passed**
- Explicit AST parse with bytecode disabled: **8 scripts parsed**
- Bytecode artifacts after cleanup: **0**
- IDE lints: **0**
- Documented local-path check: **PASS**
- External source links: **PASS** (HTTP 403 from HHS/AHRQ is access control; REMS@FDA returned HTTP 200 with a browser user agent)
- Direct behavioral security scan: **SAFE, 0 findings**
- Pull-request gate with `--fail-on HIGH`: **PASS**
  - CRITICAL: 0
  - HIGH: 0
  - LOW: 2

The first direct scan reported a CRITICAL test-only false positive because the synthetic AST test contained literal names for dynamic-execution functions and used a subprocess to exercise `--help`. The help test was changed to call each parser directly and the prohibited names were constructed without executable references. The final direct scan is clean.

## Historical residual LOW findings

The LLM-assisted pull-request scan reported:

1. **Missing `allowed-tools` declaration** — informational. The field is optional. The compatibility statement and body explicitly limit bundled tools to local standard-library JSON processing, and the direct behavioral scan confirms no network, credential, process, model, or image behavior.
2. **Invented missing-file variants** — scanner false positive. It claimed files under `templates/` and swapped `assets/` and `references/` paths that do not appear in the skill. The deterministic documented-local-path test resolves every actual local path and passes.

Neither LOW finding permits data transmission or clinical decision-making. The recorded July scan reported no actual CRITICAL or HIGH finding after review. The repository-level `SECURITY.md` is intentionally not edited in this scoped refresh; its generated snapshot will update through the repository's normal process.

## Reproduction

```bash
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover \
  -s tests/treatment-plans -p 'test_*.py' -v

uv run skills-ref validate skills/treatment-plans

uv run skill-scanner scan skills/treatment-plans --use-behavioral

uv run python scan_pr_skills.py \
  --fail-on HIGH \
  --output /tmp/treatment-plans-pr-scan.md \
  skills/treatment-plans
```
rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).Stars: 198kUpdated Claude CodeCodexUnverifiedInstall
doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.Stars: 198kUpdated Claude CodeCodexVerifiedInstall