reddygopalkrishna/trading-skills / skills/trading-entry
trading-entry
VerifiedEntry timer for intraday setups in any market - watches bar by bar and says the moment a setup triggers, waiting (and how far), still forming, expired or market closed. Opening-range breakout (first 15 minutes by default) or a break of any level you give, long or short, on 1, 2, 5 or 15-minute bars, with an optional volume check and a no-entries-near-the-close cutoff. Reads each exchange's session from the data (NSE 09:15, NYSE 09:30, LSE 08:00...), replays past sessions for practice, and hands the trigger to trading-plan with stop ideas. Never places an order. Use when the user says "tell me when to get in", "watch RELIANCE", "has it broken out", "did it break the opening range", "time my entry", "ORB", "check my watchlist for breakouts", or after a scan finds a setup.
scripts/_vendor/tradekit/cli.py
View on GitHub"""Shared CLI plumbing: consistent JSON/markdown output and error handling.
Every skill script prints either JSON (--json) or concise markdown, and exits
non-zero with a one-line error the agent can act on.
"""
from __future__ import annotations
import argparse
import json
import math
import sys
from typing import Any, Callable, Dict, List, Optional, Sequence
def parser(description: str) -> argparse.ArgumentParser:
p = argparse.ArgumentParser(description=description, formatter_class=argparse.RawDescriptionHelpFormatter)
return p
def add_json_flag(p: argparse.ArgumentParser) -> None:
p.add_argument("--json", action="store_true", help="print machine-readable JSON")
def _clean(o: Any) -> Any:
if isinstance(o, float):
if math.isnan(o) or math.isinf(o):
return None
return o
if isinstance(o, dict):
return {str(k): _clean(v) for k, v in o.items()}
if isinstance(o, (list, tuple)):
return [_clean(v) for v in o]
return o
def dump(obj: Any) -> str:
return json.dumps(_clean(obj), indent=2, default=str)
def emit(obj: Any, as_json: bool, md: Optional[Callable[[Any], str]] = None) -> None:
if as_json or md is None:
print(dump(obj))
else:
print(md(obj))
def fail(msg: str, code: int = 2) -> None:
print(f"ERROR: {msg}", file=sys.stderr)
sys.exit(code)
def run(main: Callable[[], Any]) -> None:
"""Wrap a script's main(): turn expected exceptions into clean one-line errors."""
try:
main()
except KeyboardInterrupt:
fail("interrupted", 130)
except (ValueError, KeyError, RuntimeError, FileNotFoundError) as e:
fail(str(e).strip("'\""))
def md_table(rows: List[Dict], cols: Sequence[str], headers: Optional[Sequence[str]] = None) -> str:
if not rows:
return "_no rows_"
headers = headers or cols
out = ["| " + " | ".join(headers) + " |", "|" + "|".join("---" for _ in cols) + "|"]
for r in rows:
cells = []
for c in cols:
v = r.get(c)
if isinstance(v, float):
v = f"{v:,.2f}"
elif v is None:
v = "-"
cells.append(str(v))
out.append("| " + " | ".join(cells) + " |")
return "\n".join(out)
def num(v: Optional[float], digits: int = 2) -> str:
if v is None:
return "-"
return f"{v:,.{digits}f}"
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |