← ClaudeAtlas

pynecore-practicelisted

The Pine-first way to write PyneCore strategies, indicators and libraries: author the Pine Script in `content/<name>.pine` (libraries in `content/lib/<user>/<Name>/v<N>.pine`), generate the same-named `scripts/<name>.py` with the local pine2pyne, verify it against PyneCore, run it with `pyne run <name>.py <data>`, and iterate in the Pine only. Use whenever a task writes or changes a strategy or indicator in a project with a `content/` folder, mentions `content/` or 'Pine-first', asks to add an input or change the logic of a strategy kept as `.pine`, or when a `.pine` and a same-named `.py` both exist. Covers the layout, the helper that converts, checks and runs, `scripts/<name>.toml` overrides, libraries, what to commit, PyneIDE and its agent files, porting by hand, recording problems in `docs/pynecore_vs_pine.md`, and reporting. Self-contained: carries the pine2pyne install-and-use guide and its install checker.
theonetrade/pynecore-skills · ★ 2 · Data & Documents · score 78
Install: claude install-skill theonetrade/pynecore-skills
# Pine-first: `content/<name>.pine` → `scripts/<name>.py` → `pyne run` The user writes strategies in Pine Script and runs them on PyneCore. The Pine source is the only file edited by hand and **stays in `content/` after generation, for the life of the script**; the Pyne script is generated from it by the local `pine2pyne` (install and usage guide: `references/pine2pyne.md`), carries the same stem, and is what `pyne run` executes. Every development iteration is the same three moves: change the `.pine`, regenerate the `.py`, run. Every statement below was exercised on a workdir with the demo data (PyneCore 6.12.1, pine2pyne 0.2.11): a strategy, an indicator and a library, converted, run, edited and re-converted. ``` <workdir>/ ├── .pyne ├── content/ # Pine sources: the source of truth, edited by hand │ ├── ema_atr.pine # strategy("...") or indicator("...") │ └── lib/mine/Helpers/v1.pine # library("Helpers"), imported as `import mine/Helpers/1 as h` ├── scripts/ # generated by pine2pyne, same stems; never edited by hand │ ├── ema_atr.py # header: "compiled by pine2pyne <version>" │ ├── ema_atr.toml # inputs and settings, written by the first run (see rule 4) │ └── lib/mine/Helpers/v1.py # imported by the script as `lib.mine.Helpers.v1` ├── data/ # candle files (demo.ohlcv + demo.toml, downloads) └── output/ # ema_atr.