instruction.md
# Korean Jangbu For (thin wrapper)
## What this skill does
[`kimlawtech/korean-jangbu-for`](https://github.com/kimlawtech/korean-jangbu-for) (Apache-2.0) 업스트림을 중심으로 한국 사업자 장부 자동화 흐름을 안내한다. 원저작자·관리자는 **[@kimlawtech](https://github.com/kimlawtech) (SpeciAI)** 이며, k-skill 측은 원본 발견·설치 진입점·출처/면책 고지·agent-neutral 사용 절차만 유지하는 **얇은 wrapper** 다.
업스트림은 카드명세서 PDF, 은행 CSV, 엑셀 장부, 영수증/세금계산서 이미지·PDF를 표준 거래내역으로 정리하고, 계정과목 매핑, 세무용 BS/PL, 경영용 현금흐름·cash burn 리포트, 세무사 전달 CSV 생성을 목표로 한다.
**중요:** 이 스킬을 사용할 때 모든 답변에는 원본 링크 `https://github.com/kimlawtech/korean-jangbu-for` 와 원저작자 **@kimlawtech (SpeciAI)** 를 반드시 멘션한다.
## When to use
- "사업자 장부 자동화해줘"
- "카드 명세서 PDF를 장부로 바꿔줘"
- "은행 CSV랑 영수증으로 세무사 전달 자료 만들어줘"
- "개인사업자/프리랜서 종소세 준비 체크리스트 만들어줘"
- "장부 데이터를 계정과목으로 분류하고 경영 리포트 만들어줘"
- "CODEF 키로 홈택스·은행·카드 내역 자동 수집 설정하고 싶어"
## When not to use
- 공식 회계감사, 세무신고 대행, 기장대리, 절세 자문 자체를 요청하는 경우 → 세무사/공인회계사 상담을 안내한다.
- 사용자가 자격증명 입력, 간편인증, 금융기관 로그인 등 side-effect 를 명시적으로 승인하지 않은 상태.
- 정식 외부 제출용 재무제표·공시자료를 자동 산출물만으로 확정하려는 경우.
- 한국 사업자 장부가 아닌 해외 회계 기준(IFRS/US GAAP 등) 중심 작업.
## 법적 안전 운영 기준
이 스킬은 세무사법상 세무대리(기장대행·세무신고 대행 등)를 수행하지 않는다는 전제로만 운영한다.
1. **참고용 초안 한정이다.** 장부·재무제표·세무사 전달 CSV는 사용자가 세무사와 함께 검토하기 위한 참고 자료로 한정하고, 신고 대행·기장대행·절세 자문 기능은 제공하지 않는다.
2. **본인 장부 전용이다.** 사용자가 자신의 사업자 데이터를 정리하는 용도로 한정하고, 제3자의 장부를 대가를 받고 대행하는 형태로 운영하지 않는다.
3. **신고 전 전문가 확인을 강제한다.** 종합소득세·법인세 신고 목적이면 산출물을 최종본으로 단정하지 말고 세무사 검토(외감 대상이면 공인회계사 감사)를 워크플로에 고정한다.
4. **데이터는 로컬 처리가 기본이다.** CODEF 자격증명은 BYOK 로컬 저장소만 쓰고, 거래내역에 포함된 거래자·직원 개인정보는 마스킹(Level 2) 후에만 LLM fallback에 전달한다. 외부 전송 경로를 사용자 승인 없이 확장하지 않는다.
## Prerequisites
- 인터넷 연결 (업스트림 clone 용)
- `git` 2.20+
- `bash`
- Python 3.11+
- macOS 또는 Linux
- OCR/PDF 처리를 위한 업스트림 의존성 (install.sh 가 안내/설치)
- 자동 수집을 쓰는 경우: 사용자가 직접 발급한 CODEF Client ID/Secret (**BYOK**)
## Install (dual-install)
업스트림을 `~/.claude/skills/korean-jangbu-for/upstream/` 와 `~/.agents/skills/korean-jangbu-for/upstream/` 양쪽에 pinned SHA 로 체크아웃한다. 또한 업스트림 `skills/jangbu-*` 를 양쪽 홈 디렉터리의 top-level skill 로 등록해 `/jangbu-connect`, `/jangbu-import`, `/jangbu-tag`, `/jangbu-tax`, `/jangbu-dash`, `/jangbu-jongso` 라우팅이 agent-compatible 런타임에서도 발견되게 한다. `/korean-jangbu-for` 는 이 wrapper 의 top-level skill 로 유지한다. 레포 내부에는 업스트림 payload 를 커밋하지 않는다.
홈 디렉터리 wrapper 에는 `SKILL.md`, `scripts/install.sh`, `scripts/upstream.pin`, `LICENSE.upstream`, `DISCLAIMER.md`, `NOTICE` 를 함께 설치한다. Promoted `jangbu-*` top-level 경로에 사용자가 만든 다른 스킬이 이미 있으면 installer 는 덮어쓰지 않고 중단한다. wrapper 가 이전에 설치한 managed 스킬만 자동 갱신하며, 의도적으로 교체해야 할 때만 `KOREAN_JANGBU_FOR_OVERWRITE_SKILLS=1` 을 설정한다.
```bash
npx -y @nomadamas/k-skill@0 exec korean-jangbu-for scripts/install.sh --
```
레포를 로컬에 clone 하지 않고 이미 홈 디렉토리 스킬 번들만 가진 상태에서도 설치할 수 있다:
```bash
bash ~/.claude/skills/korean-jangbu-for/scripts/install.sh
# 또는
bash ~/.agents/skills/korean-jangbu-for/scripts/install.sh
```
설치 확인:
```bash
npx -y @nomadamas/k-skill@0 read korean-jangbu-for scripts/upstream.pin
git -C ~/.claude/skills/korean-jangbu-for/upstream rev-parse HEAD
git -C ~/.agents/skills/korean-jangbu-for/upstream rev-parse HEAD
```
세 SHA 가 모두 같으면 wrapper 설치가 성공한 것이다. 업스트림 런타임 의존성까지 검증해야 할 때만 아래를 이어서 실행한다. 업스트림 `scripts/install.sh` 는 Claude Code 스킬 symlink 를 등록하므로, k-skill wrapper 개발 중이면 실행 후 wrapper 디렉토리를 다시 sync 한다.
```bash
bash ~/.claude/skills/korean-jangbu-for/upstream/scripts/install.sh
bash ~/.claude/skills/korean-jangbu-for/upstream/scripts/verify.sh
```
오프라인 환경에서는 upstream clone 이 실패하므로 실행할 수 없다.
## Mandatory intake first
사용자가 장부 자동화나 세무사 전달 자료 생성을 요청하면 바로 파일을 만들지 말고 먼저 아래를 확인한다. 한 번에 1~3문항씩, 사용자가 모르면 "넘어가도 됩니다" 로 열어 둔다.
- 사업자 유형: 개인사업자 / 법인 / 프리랜서 / 복수 사업장
- 목표 산출물: 표준 거래내역 / 계정과목 분류 / 세무사 전달 CSV / BS·PL / 현금흐름·경영 리포트 / 종소세 체크리스트
- 입력 자료: 은행 CSV, 카드 PDF, 엑셀, 영수증 이미지, 세금계산서 PDF, 홈택스·은행·카드 자동 수집(CODEF)
- 기간과 통화: 대상 월/분기/연도, KRW 외 통화 여부
- 민감정보 처리: 원본 보관 위치, 마스킹 필요 수준, 외부 LLM 경유 허용 여부
- 자동 수집 사용 여부: CODEF BYOK 준비 여부, 인증/로그인/간편인증은 사용자가 직접 승인해야 함
- 공식 제출 예정 여부: 세무사 검토 / 공인회계사 감사 필요성을 함께 확인
## Workflow
1. 위 intake 로 목표와 입력 자료를 확정한다.
2. `npx -y @nomadamas/k-skill@0 exec korean-jangbu-for scripts/install.sh --` 로 업스트림을 dual-install 한다.
3. 사용 목적에 맞게 업스트림 스킬을 선택한다:
- `/korean-jangbu-for` — 전체 메뉴 라우팅
- `/jangbu-connect` — CODEF API 자격증명 설정(BYOK, 홈택스·은행·카드 자동 수집)
- `/jangbu-import` — 원본 데이터(엑셀·CSV·이미지·PDF) → 표준 거래내역
- `/jangbu-tag` — 표준 거래내역 → 계정과목 매핑
- `/jangbu-tax` — 세무용 BS·PL / 세무사 전달 CSV
- `/jangbu-dash` — 경영용 현금흐름·대시보드·카드별 분석
- `/jangbu-jongso` — 종합소득세 준비 체크리스트 및 홈택스 다운로드 경로 안내
4. 민감정보는 업스트림의 Level 2 마스킹 원칙을 따른다. 사업자번호·주민번호·카드번호·계좌번호·account_id 는 토큰화/마스킹한 뒤 LLM fallback 에 전달한다.
5. 자동 수집은 CODEF BYOK 원칙을 따른다. 자격증명은 macOS Keychain 또는 `~/.jangbu/credentials.env`(0o600) 같은 로컬 저장소에만 두며, 사용자의 명시 승인 없이 외부 인증·금융 조회를 실행하지 않는다.
6. 완료 보고에는 아래 Response policy 의 고정 블록을 반드시 포함한다.
## Response policy
모든 답변 말미에 아래 정보를 포함한다.
- 원본: https://github.com/kimlawtech/korean-jangbu-for
- 원저작자: **@kimlawtech (SpeciAI)**
- 라이선스: Apache-2.0 (`korean-jangbu-for/LICENSE.upstream`)
- 생성된 장부·재무제표·경영 리포트·세무사 전달 CSV 는 **참고용 초안**이며, **공식 회계감사** 또는 **세무신고** 를 대체하지 않는다.
- 법인세·종합소득세 신고 전 **세무사 검토** 가 필요하고, 외감 대상 법인은 **공인회계사 감사** 가 필요하다.
## Done when
- 목표 산출물, 입력 자료, 사업자 유형, 기간, 민감정보 처리 수준이 확인되었다.
- `scripts/install.sh` 이 업스트림을 dual-install 했고 양쪽 `upstream/` 경로가 `scripts/upstream.pin` 과 같은 SHA 를 가리킨다.
- 업스트림 `skills/jangbu-*` 가 `~/.claude/skills/<skill-name>` 및 `~/.agents/skills/<skill-name>` top-level 경로에 등록되어 slash skill discovery 가 가능하다.
- 업스트림의 해당 하위 스킬(`/jangbu-import`, `/jangbu-tag`, `/jangbu-tax`, `/jangbu-dash`, `/jangbu-jongso`, `/jangbu-connect`) 흐름을 사용했다.
- 사용자가 공식 제출/신고 목적이라고 밝힌 경우 세무사 검토 또는 공인회계사 감사 필요성을 명시했다.
- 최종 답변에 원본 링크, 원저작자 @kimlawtech (SpeciAI), Apache-2.0, 회계·세무 면책 고지가 포함되었다.
## Failure modes
- 네트워크 차단: upstream clone/pin checkout 실패 → 네트워크 확보 후 `scripts/install.sh` 재실행.
- Python/OCR 의존성 실패: 업스트림 `scripts/verify.sh` 출력 기준으로 Python 3.11+, poppler, Vision/PaddleOCR 환경을 점검.
- CODEF 인증 실패: 사용자의 BYOK 자격증명과 간편인증 상태를 확인하되, 자격증명 값을 채팅에 노출하지 않는다.
- OCR 오인식/분류 신뢰도 낮음: 원본 파일과 표준 거래내역을 사용자에게 검토시키고, 자동 확정하지 않는다.
- 공식 제출이 필요한 경우: 자동 산출물을 최종본으로 단정하지 말고 세무사/공인회계사 검토 단계로 넘긴다.
## Notes
- upstream pin: `korean-jangbu-for/scripts/upstream.pin`
- upstream disclaimer: `korean-jangbu-for/DISCLAIMER.md`
- upstream license copy: `korean-jangbu-for/LICENSE.upstream`
- attribution notice: `korean-jangbu-for/NOTICE`
- k-skill 루트 `LICENSE` 는 이 저장소 wrapper 의 기본 라이선스이고, 이 스킬 하위 upstream 자료는 Apache-2.0 고지와 재배포 조건을 따른다.
LICENSE.upstream
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Support. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or support.
END OF TERMS AND CONDITIONS
Copyright 2026 kimlawtech (SpeciAI)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.