Skip to content

Commit 7b4e4ff

Browse files
committed
feat: Update eval file paths in documentation and scripts to use workspace structure for improved organization
1 parent edda98b commit 7b4e4ff

2 files changed

Lines changed: 12 additions & 14 deletions

File tree

.github/skills/copilot-skill-creator/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ Present the eval set to the user for review using the HTML template:
366366
- `__EVAL_DATA_PLACEHOLDER__` → the JSON array of eval items (no quotes around it — it's a JS variable assignment)
367367
- `__SKILL_NAME_PLACEHOLDER__` → the skill's name
368368
- `__SKILL_DESCRIPTION_PLACEHOLDER__` → the skill's current description
369-
3. Write to a temp file (e.g., `/tmp/eval_review_<skill-name>.html`) and open it: `open /tmp/eval_review_<skill-name>.html`
369+
3. Write to the skill's workspace (e.g., `<skill-name>-workspace/eval_review_<skill-name>.html`) and open it: `open <skill-name>-workspace/eval_review_<skill-name>.html`
370370
4. The user can edit queries, toggle should-trigger, add/remove entries, then click "Export Eval Set"
371371
5. The file downloads to `~/Downloads/eval_set.json` — check the Downloads folder for the most recent version in case there are multiple (e.g., `eval_set (1).json`)
372372

@@ -437,8 +437,8 @@ When using an AI client without subagent support, the core workflow is the same
437437

438438
**Updating an existing skill**: The user might be asking you to update an existing skill, not create a new one. In this case:
439439
- **Preserve the original name.** Note the skill's directory name and `name` frontmatter field -- use them unchanged. E.g., if the installed skill is `research-helper`, output `research-helper.skill` (not `research-helper-v2`).
440-
- **Copy to a writeable location before editing.** The installed skill path may be read-only. Copy to `/tmp/skill-name/`, edit there, and package from the copy.
441-
- **If packaging manually, stage in `/tmp/` first**, then copy to the output directory -- direct writes may fail due to permissions.
440+
- **Copy to a writeable location before editing.** The installed skill path may be read-only. Copy to `<skill-name>-workspace/skill-copy/`, edit there, and package from the copy.
441+
- **If packaging manually, stage in the workspace directory first** (e.g., `<skill-name>-workspace/`), then copy to the output directory -- direct writes may fail due to permissions.
442442

443443
---
444444

.github/skills/copilot-skill-creator/scripts/run_eval.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222
def find_project_root() -> Path:
2323
"""Find the project root by walking up from cwd looking for .github/.
2424
25-
Ensures the temporary skill file created during eval lands under the
26-
project's .github/skills/ directory, which is where the Copilot CLI
27-
looks for skill definitions.
25+
Used to construct the workspace path where eval artifacts are stored.
2826
"""
2927
current = Path.cwd()
3028
for parent in [current, *current.parents]:
@@ -46,17 +44,17 @@ async def run_single_query_async(
4644
4745
Injects the skill into the session via system_message and uses
4846
on_pre_tool_use to detect — and immediately deny — any read_file call
49-
targeting the skill. No files are written to the workspace, avoiding
50-
VS Code file-watcher churn when many queries run in parallel.
51-
The ``project_root`` parameter is retained for API compatibility but
52-
is no longer used.
47+
targeting the skill. No files are written to disk — the path is a
48+
fictional reference used purely as a marker string; detection fires in
49+
on_pre_tool_use before the read executes and the call is denied immediately.
5350
"""
5451
unique_id = uuid.uuid4().hex[:8]
5552
clean_name = f"{skill_name}-skill-{unique_id}"
56-
# Point to /tmp so no workspace files are touched (VS Code watches .github/).
57-
# The file does not need to exist: detection fires in on_pre_tool_use before
58-
# the read executes, and we deny the call immediately after.
59-
skill_file_ref = f"/tmp/copilot-skill-evals/{clean_name}/SKILL.md"
53+
# Point to the skill's workspace folder so all eval artifacts stay in one
54+
# place alongside other iteration outputs. The file does not need to exist:
55+
# detection fires in on_pre_tool_use before the read executes, and we deny
56+
# the call immediately after — nothing is ever written to disk.
57+
skill_file_ref = f"{project_root}/.github/skills/{skill_name}-workspace/copilot-skill-evals/{clean_name}/SKILL.md"
6058
system_message = {
6159
"content": (
6260
"You have access to the following skills. When a user's request matches "

0 commit comments

Comments
 (0)