Skip to content

Commit d5d1fe0

Browse files
drbenvincentcursoragentCopilot
authored
Separate developer and user agent skills (#927)
* refactor: separate developer and user agent skills Move user-facing skills (designing-experiments, loading-datasets, performing-causal-analysis, running-placebo-analysis) out of .github/skills/ into causalpy/skills/ so they ship with the pip wheel and are version-locked to the library API. Developer skills remain in .github/skills/ and are auto-discovered via existing symlinks. User skills require explicit installation via the new `causalpy skills install` CLI. Co-authored-by: Cursor <cursoragent@cursor.com> * feat: add skills CLI, platform adapters, and llms.txt generator Add `causalpy skills install` CLI that copies user skills from the installed package into platform-specific locations (Cursor, Claude Code, GitHub Copilot, Windsurf, or generic llms.txt). Includes version stamping, uninstall support, and version-check command. Update AGENTS.md, README, Makefile, pyproject.toml, Sphinx conf, and Cursor commands to reflect the new skills architecture. Co-authored-by: Cursor <cursoragent@cursor.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * fix: address PR review comments - Insert version stamp after YAML frontmatter instead of before it so tools that expect frontmatter at byte 0 are not broken - Make _rmtree_if_exists() symlink-safe: unlink symlinks without following, refuse to remove paths outside the project directory - Make html Makefile target depend on llms-txt so docs builds include the generated llms.txt automatically - Add pytest suite for install/uninstall/check_version/platform detection and symlink safety Co-authored-by: Cursor <cursoragent@cursor.com> * test: fix copilot detection test to match narrower detection logic The remote updated copilot detection to require copilot-instructions.md rather than just a .github/ directory. Update and expand the test. Co-authored-by: Cursor <cursoragent@cursor.com> * fix: address GPT 5.5 review — RTD llms.txt, per-platform check, skill audit - Generate llms.txt in conf.py when missing so RTD builds include it without requiring `make llms-txt` - check_version() now returns per-platform dict instead of first match, so stale installs on individual platforms are visible - CLI `check` command displays per-platform version status - Add regression_discontinuity.md reference to performing-causal-analysis - Complete the loading-datasets skill with all 21 datasets (synthetic + CSV) - Update test assertions for new file count and check_version signature Co-authored-by: Cursor <cursoragent@cursor.com> * remove loading-datasets skill — too trivial for a dedicated skill The load_data() docstring already documents all available datasets. Co-authored-by: Cursor <cursoragent@cursor.com> * docs: add README to causalpy/skills/ explaining the directory layout Co-authored-by: Cursor <cursoragent@cursor.com> * docs: add CLI usage instructions to skills README Co-authored-by: Cursor <cursoragent@cursor.com> * docs: move Layout section to end of skills README Co-authored-by: Cursor <cursoragent@cursor.com> * remove CLI skill installer — distribution moves to Decision AI Hub Delete the entire CLI installer stack (_cli.py, _installer.py, _platforms/, _generate_llms_txt.py, tests) and revert the pyproject.toml console-script entry, Makefile llms-txt target, and Sphinx conf.py hook. User-facing skills remain in causalpy/skills/ as the source of truth; distribution to end users will happen via https://hub.decision.ai. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent e40af27 commit d5d1fe0

19 files changed

Lines changed: 107 additions & 41 deletions

File tree

.cursor/commands/causalpy_demos.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
# Causal Demos
22

3-
This command points to the `loading-datasets` Skill in `.github/skills/loading-datasets/`.
4-
Use that Skill for dataset discovery and example usage.
3+
Use `causalpy.load_data(name)` to load example datasets. See the `load_data()` docstring for available dataset names.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Causal Estimators
22

33
This command points to the `performing-causal-analysis` Skill in
4-
`.github/skills/performing-causal-analysis/` for estimation, summaries, and plots.
4+
`causalpy/skills/performing-causal-analysis/` for estimation, summaries, and plots.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Causal Extras
22

33
This command points to the `running-placebo-analysis` Skill in
4-
`.github/skills/running-placebo-analysis/` for the placebo-in-time workflow.
4+
`causalpy/skills/running-placebo-analysis/` for the placebo-in-time workflow.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Causal Methods
22

3-
This command points to Skills in `.github/skills/`:
3+
This command points to Skills in `causalpy/skills/`:
44

55
- `designing-experiments` for method selection
66
- `performing-causal-analysis` for method usage and references
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# Causal Research
22

33
This command points to the `designing-experiments` Skill in
4-
`.github/skills/designing-experiments/` for method selection guidance.
4+
`causalpy/skills/designing-experiments/` for method selection guidance.

.github/skills/loading-datasets/SKILL.md

Lines changed: 0 additions & 30 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ dist/
1414
docs/build/
1515
docs/jupyter_execute/
1616
docs/source/api/generated/
17-
1817
.cursor/plans
1918
.marimo/
2019

AGENTS.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ creation, bug reports, and issue evaluation workflows.
100100

101101
## Skills Location
102102

103-
Canonical skills live in `.github/skills/`. The `.claude/skills` and
104-
`.cursor/skills` paths are symlinks to that directory. On Windows, symlink
105-
support may require Developer Mode or elevated permissions; if symlinks are not
106-
available, mirror `.github/skills/` into those locations and keep them in sync.
103+
Skills are split into two categories with separate homes:
104+
105+
- **Developer skills** live in `.github/skills/` and are auto-discovered by agents working on the repo via the `.cursor/skills`, `.claude/skills`, and `.agents/skills` symlinks. These cover environment setup, PR workflows, issue triage, and other maintainer tasks.
106+
- **User skills** live in `causalpy/skills/` inside the source tree. They teach AI agents how to use CausalPy for causal inference tasks. They are **not** symlinked into the auto-discovery paths — a developer agent should not see experiment-design skills mixed in with PR review skills. User skills are distributed via [Decision AI Hub](https://hub.decision.ai).
107+
108+
On Windows, symlink support for developer skills may require Developer Mode or elevated permissions; if symlinks are not available, mirror `.github/skills/` into `.cursor/skills/`, `.claude/skills/`, and `.agents/skills/` and keep them in sync.

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ Alternatively, if you want the very latest version of the package you can instal
6161
pip install git+https://github.com/pymc-labs/CausalPy.git
6262
```
6363

64+
## AI Agent Skills
65+
66+
CausalPy includes agent skills that teach AI coding assistants how to use the library for causal inference. Skills are available via [Decision AI Hub](https://hub.decision.ai) and live in `causalpy/skills/` in the source tree.
67+
6468
## Quickstart
6569

6670
```python

causalpy/skills/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# User-Facing Agent Skills
2+
3+
Markdown skills in this directory teach AI coding agents how to use CausalPy for causal inference tasks. They are distributed to end users via [Decision AI Hub](https://hub.decision.ai).
4+
5+
Developer-focused skills (environment setup, PR workflows, testing conventions, etc.) live in `.github/skills/` and are auto-discovered in-repo via platform symlinks. They are **not** included here.
6+
7+
## Layout
8+
9+
| Path | Purpose |
10+
|------|---------|
11+
| `designing-experiments/` | Choosing the right quasi-experimental method |
12+
| `performing-causal-analysis/` | Fitting models, estimating impacts, plotting results |
13+
| `running-placebo-analysis/` | Placebo-in-time sensitivity checks |

0 commit comments

Comments
 (0)