hany202507/finance-ai-skills / skills/DSD초안
DSD초안
Verified전기(작년) 감사보고서 · 연결감사보고서 dsd 하나로 당기 초안 dsd 를 만든다. 회사가 준 전기 dsd 든, DSD변환 스킬이 작년 공시 원문으로 만든 dsd 든 그 파일만 있으면 된다. 당기 숫자를 전기 칸으로 옮기고 당기 칸을 비우며, 기수 · 해 +1, 변동표의 새 당기 기초를 작년 기말로 채우고, 원고 엑셀과 초안 검산 · 안내까지 한 번에 낸다. 같은 전기 파일이면 몇 번을 돌려도 바이트까지 같다. "전기 DSD 로 당기 초안", "작년 dsd 로 올해 초안", "다음 기수 초안", "초안 만들어 줘", "롤포워드", "기초 채워서", "당기 초안으로 바꿔 줘", "전기 dsd 있어", "초안 dsd", "이 원고로 dsd 다시 만들어 줘"가 언급되면 트리거. 공시 원문을 dsd 로 바꾸는 것은 DSD변환, 초안 · 회사제시 dsd 의 숫자 검증은 DSD푸팅 스킬이다.
tests/test_draft.py
View on GitHub"""DSD초안: 가상 회사(누리정밀(가상))의 작년 dsd 하나로 당기 초안을 만든다. 같은 파일이면 바이트까지 같고, sheet → build 와 본문이 같다."""
from __future__ import annotations
import json
import sys
import zipfile
from pathlib import Path
HERE = Path(__file__).resolve().parent
sys.path[:0] = [str(HERE.parent / "scripts"), str(HERE)]
from dsd_company import make_company_dsd # noqa: E402
from run import main as cli # noqa: E402
def _contents(path: Path) -> bytes:
with zipfile.ZipFile(path) as z:
return z.read("contents.xml")
def test_draft_from_prior_dsd(tmp_path, capsys):
prev = make_company_dsd(tmp_path / "작년.dsd", year=-1)
a, b, c = tmp_path / "a", tmp_path / "b", tmp_path / "c"
assert cli(["draft", str(prev), "--out", str(a)]) == 0
out = capsys.readouterr().out
assert "누리정밀(가상)" in out and "다음 기수 초안 →" in out and "초안 검산" in out
stem = "누리정밀(가상)_2025_감사보고서_초안"
dsd_a, book_a = a / f"{stem}.dsd", a / f"원고_{stem}.xlsx"
assert dsd_a.exists() and book_a.exists() and (a / f"초안안내_원고_{stem}.txt").exists()
issues = json.loads((a / f"원고검사_원고_{stem}.json").read_text(encoding="utf-8"))
assert isinstance(issues, list) and not [x for x in issues if x.get("분류") == "초안 검산"] # 만든 dsd 가 원고와 같다
assert cli(["draft", str(prev), "--out", str(b)]) == 0
capsys.readouterr()
for name in (dsd_a.name, book_a.name):
assert (a / name).read_bytes() == (b / name).read_bytes() # 같은 전기 파일이면 바이트까지 같다
assert cli(["sheet", str(prev), "--roll", "--out", str(c)]) == 0
assert cli(["build", str(c / "원고_작년.xlsx")]) == 0
capsys.readouterr()
assert _contents(dsd_a) == _contents(c / "작년_원고판.dsd")
def test_draft_rejects_bad_input(tmp_path, capsys):
assert cli(["draft", str(tmp_path / "없음.dsd")]) == 2
bad = tmp_path / "아님.dsd"
bad.write_bytes(b"not a zip")
assert cli(["draft", str(bad)]) == 2
capsys.readouterr()
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: 196k | 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: 196k | 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: 196k | Updated | Claude CodeCodex | Verified | Install |