agent-security-hardening
AFaffaan-m/ECC314k4,125 new stars in the last 7 days
Use when converting an existing benchmark, rubric, verifier, task YAML/JSON, or domain check into SkillEvaluator BYOG/BYOT custom evaluation.
Convert team-owned benchmark definitions into runnable SkillEvaluator custom graders and, when needed, native Harbor tasks.
Help an agent author valid SkillEvaluator BYOG/BYOT files from a user's benchmark instead of leaving the user with empty grader templates.
Use this skill when the user wants to:
evals/grader.py or evals/grader.shtask.yaml, task.json, pytest checks, or shell
verifiers into BYOG or BYOTDo not use this skill for ordinary evals/evals.json authoring when no custom
grading logic is needed. Use the normal dataset authoring workflow for that.
evals/, benchmark prompts, fixtures, and any verifier code.default_plus_custom when custom metrics should complement default evaluator scoring.custom_only only when the user wants the custom grader to own pass/fail semantics.evals/grader.py or evals/grader.sh, then validate the Harbor contract.skillevaluator init-custom-grader <skill-dir> --language python --mode default_plus_custom
skillevaluator tier3 validate <skill-dir>
SKILL.md.skillevaluator.Choose one path before writing files:
| User need | Evaluator shape |
|---|---|
Existing evals/evals.json task plus extra domain checks | Top-level BYOG: evals/grader.py or evals/grader.sh |
| Existing benchmark prompt/rubric that can run in the generated workspace | Top-level BYOG plus evals/evals.json and evals/files/ |
| Benchmark owns task layout, setup, service lifecycle, or verifier harness | Native BYOT/BYOG: evals/harbor/<case>/... |
| User wants only custom reward/pass criteria | grading.mode: custom_only |
| User wants default evaluator dimensions plus custom metrics | grading.mode: default_plus_custom |
Default to default_plus_custom unless the user explicitly wants the custom
grader to replace the default evaluator metrics.
Resolve the target skill and benchmark source.
Read the target SKILL.md, existing evals/, benchmark prompts, fixtures,
rubric, reference solution, tags, and any expected trigger/non-trigger
metadata.
Map benchmark fields into evaluator inputs.
Prefer the agentskills.io dataset shape: put the target skill name in the
top-level skill_name, and use benchmark prompts or prompt variants as
per-case prompt fields. Use question only when extending an existing
legacy-format dataset. Per-case expected_skill stays valid, with null for
a negative case. Put each case's required starter files under
evals/files/<case-id>/, and declare
files: ["evals/files/<case-id>"] on every corresponding eval entry. Do not
omit files in a multi-case dataset, because omission intentionally stages
the entire shared directory for legacy compatibility. Preserve
benchmark-specific rubric text in the entry only when the grader needs to
read it.
Scaffold the evaluator contract. For generated tasks:
skillevaluator init-custom-grader <skill-dir> --language python --mode default_plus_custom
For shell checks:
skillevaluator init-custom-grader <skill-dir> --language shell --mode default_plus_custom
For native Harbor tasks:
skillevaluator init-harbor-task <skill-dir> --case-id <case-id> --with-config
Replace scaffold placeholders. The custom grader is real executable logic, not metadata. It must read available evidence, compute numeric scores, and write the evaluator reward contract.
Validate before running.
skillevaluator tier3 validate <skill-dir> --harbor-contract
Fix missing files, invalid Python, missing reward output, and native Harbor ID mismatches before evaluation.
Run the deepest practical proof. Prefer a real with-skill/baseline run. If services, credentials, GPU, or cost block full E2E, state exactly what was validated and what was not.
Python and shell graders run inside the Harbor verifier context. They may read:
/logs/agent/trajectory.json for agent actions and final answer evidence/tests/entry.json for the eval case metadata/workspace/input/ for the entry's declared committed fixtures from
evals/files//solution/ or other task outputs only when the task environment produces
themThey must write:
/logs/verifier/reward.json/logs/verifier/reward.txt with a numeric score from 0.0 to 1.0Use this reward shape:
{
"overall": 0.92,
"custom_metrics": {
"domain_repair": 1.0,
"domain_verification": 0.8
},
"details": {
"domain_repair": {
"score": 1.0,
"reason": "The solution repaired the required files."
}
}
}
In default_plus_custom, default evaluator scoring keeps its overall
authoritative and adds the grader's custom_metrics into reports. In
custom_only, the grader's overall is the pass/fail reward.
Never emit custom metric names that collide with reserved evaluator fields:
security, skill_execution, skill_efficiency, accuracy,
goal_accuracy, behavior_check, overall, details, metrics,
metric_set, or entry_id.
details.0.0 through 1.0.expected_skill,
expected_behavior, negative cases, or custom metrics that inspect
trajectory evidence.For a benchmark task with task.yaml, code/, prompt variants, coverage, and a
rubric:
code/ into evals/files/<case-id>/.evals/evals.json entries from the prompt variants, and
set files: ["evals/files/<case-id>"] on each corresponding entry.expected_skill to the benchmark's target skill.evals/grader.py to inspect the agent trajectory and changed
workspace files.rapids_diagnosis, rapids_requirements_repair,
rapids_repair_safety, and rapids_verification.init-custom-grader creates scaffolding only; the agent must replace the
placeholder scoring logic.| Problem | Fix |
|---|---|
evals/evals.json missing | Create entries from the benchmark prompt or run init-custom-grader to seed one. |
| Custom metrics do not appear | Ensure reward.json has numeric values under custom_metrics and no reserved-name collisions. |
custom_only fails | Write numeric overall in reward.json or numeric reward.txt. |
| Grader scores copied fixtures | Restrict file searches to generated workspace/output paths, not the skill package or grader source. |
When finished, report:
AFaffaan-m/ECC314k4,125 new stars in the last 7 days
Audit the whole repo: find bugs, security holes and performance bottlenecks. Get a ranked report in plain English.
DIDietrichGebert/ponytail202k4,780 new stars in the last 7 days
GAgarrytan/gstack143k636 new stars in the last 7 days
Harden code against the OWASP Top 10: input handling, authentication, sessions and dependencies.
ADaddyosmani/agent-skills122k1,627 new stars in the last 7 days
ADaddyosmani/agent-skills122k1,627 new stars in the last 7 days
RUruvnet/RuView106k693 new stars in the last 7 days