Initial commit
This commit is contained in:
12
.claude-plugin/plugin.json
Normal file
12
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"name": "denote-org-pack",
|
||||||
|
"description": "Local convenience pack: denote-org plus Anthropic document skills (PDF/XLSX) for daily work.",
|
||||||
|
"version": "0.0.0-2025.11.28",
|
||||||
|
"author": {
|
||||||
|
"name": "Junghan Kim",
|
||||||
|
"email": "junghanacs@gmail.com"
|
||||||
|
},
|
||||||
|
"skills": [
|
||||||
|
"./skills/junghan0611__org-mode-skills"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# denote-org-pack
|
||||||
|
|
||||||
|
Local convenience pack: denote-org plus Anthropic document skills (PDF/XLSX) for daily work.
|
||||||
116
plugin.lock.json
Normal file
116
plugin.lock.json
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:junghan0611/org-mode-skills:denote-org-pack",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "c7aa54da50078fc5c7aa86174638e91c2af7b7b4",
|
||||||
|
"treeHash": "4af8396abd842cd102532669ccfea6856fb8c92fc74da25161c368df968194dc",
|
||||||
|
"generatedAt": "2025-11-28T10:19:22.080847Z",
|
||||||
|
"toolVersion": "publish_plugins.py@0.2.0"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||||
|
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||||
|
},
|
||||||
|
"manifest": {
|
||||||
|
"name": "denote-org-pack",
|
||||||
|
"description": "Local convenience pack: denote-org plus Anthropic document skills (PDF/XLSX) for daily work."
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "f1b1ecafdeb0a57eb19a9ca9a0221e8e3b6dbdd0afa7aef54f178199e57c473b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "6a735551d2f70ed0de51e1f1c588a1dc2c8da1598dbdafb94904d0572b1a5ae9"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/README-KO.md",
|
||||||
|
"sha256": "dc07a39f473207fe21330f9b1e6145dcc7c99a890856f4b29d6094afbca22c9c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/LICENSE",
|
||||||
|
"sha256": "fbcf76ca202d4a32f81dbe80a665a8187ce06a878a82ca6dccf3417de4200246"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/TODO.org",
|
||||||
|
"sha256": "4d81d46ea0960be4e4500f94a9c8224c950e3b97f225883e687c353fca08857b"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/README.md",
|
||||||
|
"sha256": "58fbd678199a5d68bac4de7188d22f69cf80f2ad6819ce7fae4995ecdb76cb74"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/.gitignore",
|
||||||
|
"sha256": "79318f8e3b420fdc13254bbcd51f51000e1b0cc7a6b8a769af0a1d1fab2d0281"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/SKILL.md",
|
||||||
|
"sha256": "0e466ba0843d2f7fce825a5062015eab8fa12074ca772ed589712b140e6a3bb7"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/references/api_reference.md",
|
||||||
|
"sha256": "b48c1aaceb5d76a2c0c8ad2609ecfa60e8331a0e6eda7d790f68b497f2e22810"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/docs/20251118T121000--opencode에서-glg-skills-활용-가이드__skills_opencode.org",
|
||||||
|
"sha256": "4ec24627f63bac22fac278a5aea1e4c4991aa1df454855a69e9c4a464044a0d8"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/docs/20251021T113500--denote-org-skills-프로젝트-시작-배경-및-작업-로그__project_skills_denote_anthropic_worklog.org",
|
||||||
|
"sha256": "f7d9d4905f2a447708c6c11df816f32c618435b5f4960f0cb6f8c1d0d5dc592e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/docs/20251022T120000--skills-에이전트-학습-실험__agent_learning_experiment.org",
|
||||||
|
"sha256": "1cd8ca3deaf9ecdf88d830624bd28a39bb46fa5f24524d5f953678b9f11093b0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/docs/20251118T120000--claude-skills-등록-관리-가이드__skills_claude.org",
|
||||||
|
"sha256": "d8c8603d0543d6df735dd9a8a9473c962dca21778b32e5ccc3d05434e086167a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/skill-creator/SKILL.md",
|
||||||
|
"sha256": "8c0ce23bb87be91f5b0853c2e9815617c3858b63acdddfe5da47d2c2d3a60816"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/skill-creator/LICENSE.txt",
|
||||||
|
"sha256": "58d1e17ffe5109a7ae296caafcadfdbe6a7d176f0bc4ab01e12a689b0499d8bd"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/skill-creator/scripts/init_skill.py",
|
||||||
|
"sha256": "0bba250b94caa4cb2b28b15dad26fdcf371aeda4c9797b8120e55c2e33e0c73c"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/skill-creator/scripts/package_skill.py",
|
||||||
|
"sha256": "692525dd8096aee51730ab142fb2605894a6f1a4135bcffebbf4f8ed3cf8715e"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/skill-creator/scripts/quick_validate.py",
|
||||||
|
"sha256": "41647b79d15e7e51b944d56843e9f87a33f4c66e64ded5964d1f95bad2fe634a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/scripts/example.py",
|
||||||
|
"sha256": "9b70271feeacb4e371f1b58a36609b4034a14f3f7b40afbda60c8aeccaf7973d"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/scripts/org_headings_toc.py",
|
||||||
|
"sha256": "f09087a5ec5f42c9f880d68ab441a377ab435c6c1bafb62a9d45a2af39dd030a"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "skills/junghan0611__org-mode-skills/.claude-plugin/marketplace.json",
|
||||||
|
"sha256": "cef92d5b418dd1ec1384c0b7487a4a7e33760a454c9e1eb564ff13489a8ae455"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "4af8396abd842cd102532669ccfea6856fb8c92fc74da25161c368df968194dc"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
"name": "glg-skills",
|
||||||
|
"owner": {
|
||||||
|
"name": "Junghan Kim",
|
||||||
|
"email": "junghanacs@gmail.com"
|
||||||
|
},
|
||||||
|
"metadata": {
|
||||||
|
"description": "GLG skills: Denote/org-mode PKM and related workflows.",
|
||||||
|
"version": "0.1.0"
|
||||||
|
},
|
||||||
|
"plugins": [
|
||||||
|
{
|
||||||
|
"name": "denote-org",
|
||||||
|
"description": "Pure Denote/org-mode PKM skill (no external document skills).",
|
||||||
|
"source": "./",
|
||||||
|
"strict": false,
|
||||||
|
"skills": [
|
||||||
|
"./"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "denote-org-pack",
|
||||||
|
"description": "Local convenience pack: denote-org plus Anthropic document skills (PDF/XLSX) for daily work.",
|
||||||
|
"source": "./",
|
||||||
|
"strict": false,
|
||||||
|
"skills": [
|
||||||
|
"./",
|
||||||
|
"../skills/document-skills/pdf",
|
||||||
|
"../skills/document-skills/xlsx"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
39
skills/junghan0611__org-mode-skills/.gitignore
vendored
Normal file
39
skills/junghan0611__org-mode-skills/.gitignore
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*$py.class
|
||||||
|
*.so
|
||||||
|
.Python
|
||||||
|
env/
|
||||||
|
venv/
|
||||||
|
ENV/
|
||||||
|
*.egg-info/
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
|
|
||||||
|
# Emacs
|
||||||
|
*~
|
||||||
|
\#*\#
|
||||||
|
.\#*
|
||||||
|
*.elc
|
||||||
|
auto-save-list
|
||||||
|
tramp
|
||||||
|
.\#*
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
.vscode/
|
||||||
|
.idea/
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Test outputs
|
||||||
|
test-output/
|
||||||
|
*.test.org
|
||||||
|
|
||||||
|
# Temp files
|
||||||
|
temp/
|
||||||
69
skills/junghan0611__org-mode-skills/LICENSE
Normal file
69
skills/junghan0611__org-mode-skills/LICENSE
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
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 reasonable and customary use in 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 Additional Liability. 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 additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
Copyright 2025 Junghan Kim
|
||||||
|
|
||||||
|
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.
|
||||||
414
skills/junghan0611__org-mode-skills/README-KO.md
Normal file
414
skills/junghan0611__org-mode-skills/README-KO.md
Normal file
@@ -0,0 +1,414 @@
|
|||||||
|
# Denote-Org Skills for Claude
|
||||||
|
|
||||||
|
> **Anthropic Life Sciences 패러다임을 삶 전반으로 확장합니다**
|
||||||
|
|
||||||
|
Claude AI를 위한 포괄적인 Denote PKM 시스템 지원. **3,000개 이상의 org 파일**로 검증된 실제 운영 시스템입니다.
|
||||||
|
|
||||||
|
**Denote 중심. Org-mode 기반. 삶의 규모로 증명됨.**
|
||||||
|
|
||||||
|
[](LICENSE)
|
||||||
|
[]()
|
||||||
|
[]()
|
||||||
|
|
||||||
|
## 🌟 비전: Life Sciences → Life Everything
|
||||||
|
|
||||||
|
Anthropic은 **도메인 컨텍스트 + AI = 전문가 수준 협업**을 Life Sciences(PubMed, Benchling, 10x Genomics)로 증명했습니다.
|
||||||
|
|
||||||
|
이 프로젝트는 그 패러다임을 **생명과학(Biology)**에서 **삶(Living)**으로 확장합니다:
|
||||||
|
|
||||||
|
**Life Sciences (생명과학)** → **Life Everything (삶 전반)**
|
||||||
|
|
||||||
|
Claude가 PubMed 컨텍스트로 과학자가 되듯이, Denote 컨텍스트로 **당신의 개인 지식 파트너**가 됩니다.
|
||||||
|
|
||||||
|
### 패턴 비교
|
||||||
|
|
||||||
|
| 영역 | 컨텍스트 | 결과 |
|
||||||
|
|------|---------|------|
|
||||||
|
| **Anthropic** | PubMed (수백만 논문) + Claude | 과학 연구 AI |
|
||||||
|
| **이 프로젝트** | Denote (3,000+ org 파일) + Claude | 개인 지식 AI |
|
||||||
|
|
||||||
|
**같은 방법론. 다른 도메인. 보편적 패러다임.**
|
||||||
|
|
||||||
|
## 왜 Skills인가? 단순 프롬프트가 아닌 이유
|
||||||
|
|
||||||
|
**Anthropic Skills 철학:**
|
||||||
|
|
||||||
|
> "Skills는 Claude를 범용 에이전트에서 **절차적 지식**을 갖춘 전문 에이전트로 변환시킵니다. 이는 어떤 모델도 완전히 가질 수 없는 지식입니다."
|
||||||
|
>
|
||||||
|
> — [Equipping agents for the real world with Agent Skills](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills)
|
||||||
|
|
||||||
|
**PDF/XLSX Skills와 동일한 패턴:**
|
||||||
|
- **PDF Skill**: 복잡한 Forms 처리 (8개 Python 스크립트로 bounding box, 검증...)
|
||||||
|
- **XLSX Skill**: 공식 유지 (LibreOffice 연동 recalc.py)
|
||||||
|
- **Denote-Org Skill**: 3,000 파일 지식 그래프 (finder, graph builder, silo manager)
|
||||||
|
|
||||||
|
**Skills는 프롬프트가 아닙니다. 운영 시스템입니다.**
|
||||||
|
|
||||||
|
## 해결하는 문제
|
||||||
|
|
||||||
|
### Skills 없이
|
||||||
|
|
||||||
|
❌ Claude가 Denote 파일명을 모름: `20251021T105353--제목__태그.org`
|
||||||
|
❌ 3,000개 파일 검색에 매번 토큰 소모
|
||||||
|
❌ 지식 그래프 탐색이 느리고 오류 발생
|
||||||
|
❌ Literate programming (`:tangle`, `:results`)이 org 구조 깨뜨림
|
||||||
|
❌ 여러 silo (`~/org/`, `~/claude-memory/`) 혼란
|
||||||
|
|
||||||
|
### Skills 있으면
|
||||||
|
|
||||||
|
✅ **Denote 도메인 지식** 내장 (파일명, frontmatter, links)
|
||||||
|
✅ **Python 스크립트**로 효율적 연산 (finder, graph, executor)
|
||||||
|
✅ **지식 그래프** 캐싱 및 재사용
|
||||||
|
✅ **안전한 코드 실행** (org-babel 호환)
|
||||||
|
✅ **Silo 관리** (여러 지식 도메인)
|
||||||
|
|
||||||
|
**파일 변환기가 아닙니다. 운영 가능한 지식 시스템입니다.**
|
||||||
|
|
||||||
|
## 🎯 Denote란?
|
||||||
|
|
||||||
|
Denote는 Emacs를 위한 **단순하지만 강력한** 노트 작성 시스템입니다:
|
||||||
|
|
||||||
|
- **파일명 규칙**: `YYYYMMDDTHHMMSS--제목__태그1_태그2.org`
|
||||||
|
- **지식 그래프**: `[[denote:TIMESTAMP]]` 링크
|
||||||
|
- **Silo 개념**: 다양한 지식 도메인을 위한 별도 디렉토리
|
||||||
|
- **Org-mode 기반**: Heading, property, timestamp, code block
|
||||||
|
|
||||||
|
**제작자:** [Protesilaos Stavrou](https://protesilaos.com/emacs/denote)
|
||||||
|
|
||||||
|
## 📊 규모: 실제 운영으로 검증됨
|
||||||
|
|
||||||
|
이 Skill은 **실제 PKM 시스템**을 위해 만들어졌습니다 (장난감 예제 아님):
|
||||||
|
|
||||||
|
- ✅ **3,000개 이상 org 파일** (대규모 검증)
|
||||||
|
- ✅ **여러 silo** (`~/org/`, `~/claude-memory/`, 프로젝트 `docs/`)
|
||||||
|
- ✅ **Denote 지식 그래프** (수천 개의 `[[denote:ID]]` 링크)
|
||||||
|
- ✅ **매일 사용** (Claude Code와 함께)
|
||||||
|
- ✅ **9개 레이어 "Tools for Life" 시스템의 일부**
|
||||||
|
|
||||||
|
## 🏗️ 9개 레이어 시스템의 일부
|
||||||
|
|
||||||
|
이 Skill은 완전한 AI-인간 협업 아키텍처에서 **Layer 3** (지식 이해)를 담당합니다:
|
||||||
|
|
||||||
|
```
|
||||||
|
Layer 7: 지식 퍼블리싱 (notes.junghanacs.com)
|
||||||
|
Layer 6: 에이전트 오케스트레이션 (meta-config)
|
||||||
|
Layer 5a: 마이그레이션 (memex-kb)
|
||||||
|
Layer 5b: 삶의 타임라인 (memacs-config)
|
||||||
|
Layer 4: AI 메모리 (claude-config)
|
||||||
|
Layer 3.5: RAG/Vector DB (embedding-config)
|
||||||
|
Layer 3: 지식 관리 (Zotero, denote-org 🆕)
|
||||||
|
Layer 2: 개발 환경 (Doom Emacs)
|
||||||
|
Layer 1: 인프라 (NixOS)
|
||||||
|
```
|
||||||
|
|
||||||
|
**연관 프로젝트:**
|
||||||
|
- [claude-config](https://github.com/junghan0611/claude-config) - PARA 방법론 AI 메모리 시스템
|
||||||
|
- [memex-kb](https://github.com/junghan0611/memex-kb) - 범용 KB 마이그레이션 (Google Docs, Dooray...)
|
||||||
|
- [embedding-config](https://github.com/junghan0611/embedding-config) - Vector RAG (9,477 블록, 85% 해결률)
|
||||||
|
|
||||||
|
**철학:** Anthropic Life Sciences와 동일 - **AI는 파트너, 도구가 아님**
|
||||||
|
|
||||||
|
## 🚀 실제 사용 사례
|
||||||
|
|
||||||
|
### 사례 1: 지식 그래프 탐색
|
||||||
|
```bash
|
||||||
|
사용자: "20251021T105353와 연결된 모든 파일 찾아줘"
|
||||||
|
Claude: denote_graph.py 사용
|
||||||
|
결과: 1초 이내 연결 파일 반환 (반복 토큰 검색 아님)
|
||||||
|
```
|
||||||
|
|
||||||
|
### 사례 2: 3,000 파일 중 태그 검색
|
||||||
|
```bash
|
||||||
|
사용자: "2025년 10월 llmlog 파일 전부"
|
||||||
|
Claude: denote_finder.py --tags llmlog --date 202510* 사용
|
||||||
|
결과: 메타데이터와 함께 즉시 반환
|
||||||
|
```
|
||||||
|
|
||||||
|
### 사례 3: Silo 관리
|
||||||
|
```bash
|
||||||
|
사용자: "이게 ~/org/에 있나 ~/claude-memory/에 있나?"
|
||||||
|
Claude: denote_silo.py find_in_silos() 사용
|
||||||
|
결과: 자동으로 모호함 해결
|
||||||
|
```
|
||||||
|
|
||||||
|
### 사례 4: Literate Programming
|
||||||
|
```bash
|
||||||
|
사용자: "org 파일 코드 블록 실행해줘"
|
||||||
|
Claude: org_execute.py 사용 (org-babel 호환)
|
||||||
|
결과: 안전한 실행, 구조 보존, :results 업데이트
|
||||||
|
```
|
||||||
|
|
||||||
|
### 사례 5: Denote 링크 해결
|
||||||
|
```bash
|
||||||
|
파일 내용: [[denote:20251021T105353]]
|
||||||
|
Claude: denote_links.py resolve_link() 사용
|
||||||
|
결과: ~/org/llmlog/20251021T105353--전체-파일명.org
|
||||||
|
```
|
||||||
|
|
||||||
|
## 💡 기능
|
||||||
|
|
||||||
|
### Denote 핵심
|
||||||
|
- ✅ 파일명: `20251021T105353--제목__태그1_태그2.org`
|
||||||
|
- ✅ Frontmatter 파싱 (title, date, filetags, identifier)
|
||||||
|
- ✅ 링크 해결 (`[[denote:ID]]`)
|
||||||
|
- ✅ 태그 기반 검색
|
||||||
|
- ✅ Silo 관리 (여러 지식 도메인)
|
||||||
|
- ✅ 지식 그래프 (3,000+ 파일 검증)
|
||||||
|
|
||||||
|
### Org-mode 기반
|
||||||
|
- ✅ Heading/property 파싱
|
||||||
|
- ✅ 코드 블록 실행 (literate programming)
|
||||||
|
- ✅ Timestamp 처리
|
||||||
|
- ✅ Export (markdown, PDF, HTML)
|
||||||
|
- ✅ Table 연산
|
||||||
|
|
||||||
|
### 성능
|
||||||
|
- ✅ Python 스크립트 (토큰 생성 아님)
|
||||||
|
- ✅ 반복 연산 캐싱
|
||||||
|
- ✅ 효율적인 그래프 탐색
|
||||||
|
- ✅ 배치 처리 지원
|
||||||
|
|
||||||
|
## 📦 설치
|
||||||
|
|
||||||
|
### 사전 요구사항
|
||||||
|
```bash
|
||||||
|
# Python 3.8+
|
||||||
|
pip install orgparse pypandoc pyyaml
|
||||||
|
|
||||||
|
# Pandoc (export용)
|
||||||
|
# 패키지 매니저로 설치
|
||||||
|
```
|
||||||
|
|
||||||
|
### Claude Code
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/junghan0611/orgmode-skills.git
|
||||||
|
cd orgmode-skills
|
||||||
|
/plugin add .
|
||||||
|
```
|
||||||
|
|
||||||
|
### Claude API
|
||||||
|
```python
|
||||||
|
# Skills API 통합 문서 참조
|
||||||
|
import anthropic
|
||||||
|
|
||||||
|
client = anthropic.Client(api_key="your-api-key")
|
||||||
|
# Skills API 사용법
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🔧 빠른 시작
|
||||||
|
|
||||||
|
### 예제 1: Denote 파일 찾기
|
||||||
|
```python
|
||||||
|
from scripts.denote_finder import find_denote_file
|
||||||
|
|
||||||
|
# ID로 찾기
|
||||||
|
filepath = find_denote_file("20251021T105353", silos=["~/org/"])
|
||||||
|
# 반환: ~/org/llmlog/20251021T105353--전체-파일명.org
|
||||||
|
|
||||||
|
# 태그로 찾기
|
||||||
|
files = find_by_tags(["llmlog", "denote"], silo="~/org/")
|
||||||
|
```
|
||||||
|
|
||||||
|
### 예제 2: 지식 그래프 추출
|
||||||
|
```python
|
||||||
|
from scripts.denote_graph import build_knowledge_graph, get_connected_nodes
|
||||||
|
|
||||||
|
# 그래프 구축 (캐싱됨)
|
||||||
|
graph = build_knowledge_graph("~/org/")
|
||||||
|
|
||||||
|
# 연결된 파일 가져오기
|
||||||
|
connected = get_connected_nodes("20251021T105353", hops=2)
|
||||||
|
```
|
||||||
|
|
||||||
|
### 예제 3: Org 코드 블록 실행
|
||||||
|
```python
|
||||||
|
from scripts.org_execute import execute_org_blocks
|
||||||
|
|
||||||
|
# 모든 코드 블록 실행 (:tangle, :results 준수)
|
||||||
|
results = execute_org_blocks("file.org")
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📂 프로젝트 구조
|
||||||
|
|
||||||
|
```
|
||||||
|
orgmode-skills/
|
||||||
|
├── README.md # 영어 버전
|
||||||
|
├── README-KO.md # 한글 버전 (이 파일)
|
||||||
|
├── LICENSE # Apache 2.0
|
||||||
|
├── SKILL.md # Claude용 메인 가이드
|
||||||
|
├── docs/ # 개발 로그 (Denote 형식)
|
||||||
|
│ └── 20251021T113500--*.org
|
||||||
|
├── denote-core.md # Denote 명세
|
||||||
|
├── denote-silo.md # Silo 관리
|
||||||
|
├── denote-knowledge-graph.md # 그래프 연산
|
||||||
|
├── orgmode-base.md # Org-mode 기능
|
||||||
|
├── literate.md # Literate programming
|
||||||
|
├── export.md # Export 기능
|
||||||
|
└── scripts/
|
||||||
|
├── denote_finder.py # 파일 검색
|
||||||
|
├── denote_links.py # 링크 해결
|
||||||
|
├── denote_silo.py # Silo 관리
|
||||||
|
├── denote_graph.py # 지식 그래프
|
||||||
|
├── org_parser.py # Org 파싱
|
||||||
|
├── org_execute.py # 코드 실행
|
||||||
|
├── org_export.py # Export
|
||||||
|
└── requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🗺️ 0.1 버전 로드맵
|
||||||
|
|
||||||
|
**Phase 1: 핵심 (현재)**
|
||||||
|
- [x] 프로젝트 설정
|
||||||
|
- [x] README.md, README-KO.md
|
||||||
|
- [ ] 개발 로그 (docs/)
|
||||||
|
- [ ] SKILL.md (Denote 중심)
|
||||||
|
|
||||||
|
**Phase 2: Denote 핵심**
|
||||||
|
- [ ] denote_finder.py (파일 검색)
|
||||||
|
- [ ] denote_links.py (링크 해결)
|
||||||
|
- [ ] denote_silo.py (silo 관리)
|
||||||
|
- [ ] denote-core.md 문서화
|
||||||
|
|
||||||
|
**Phase 3: Org-mode 기반**
|
||||||
|
- [ ] org_parser.py (orgparse)
|
||||||
|
- [ ] org_execute.py (코드 블록)
|
||||||
|
- [ ] orgmode-base.md 문서화
|
||||||
|
|
||||||
|
**Phase 4: 0.1 릴리즈**
|
||||||
|
- [ ] 3,000+ 파일 테스트
|
||||||
|
- [ ] 예제 추가
|
||||||
|
- [ ] Public 공개
|
||||||
|
|
||||||
|
## 🤝 기여
|
||||||
|
|
||||||
|
이 프로젝트는 실제 3,000개 이상 파일을 운영하는 Denote PKM 시스템으로 검증되었습니다. Denote 사용자 환영합니다!
|
||||||
|
|
||||||
|
## 📖 철학: Tools for Life (인생 도구)
|
||||||
|
|
||||||
|
**제작자의 말:**
|
||||||
|
|
||||||
|
> "저에게 필요한 것은 경쟁력 있는 지식 노동자로 살 수 있는 방법이었습니다."
|
||||||
|
>
|
||||||
|
> "도구는 존재에 녹아든다"
|
||||||
|
>
|
||||||
|
> "삶이 나에게 질문하고 있었다"
|
||||||
|
|
||||||
|
이 Skill은 "Tools for Life" 철학을 구현합니다 - Anthropic의 Life Sciences 접근을 생명과학 연구에서 개인 지식 작업으로 확장합니다.
|
||||||
|
|
||||||
|
**Life Sciences (생명과학)** → **Life Everything (삶 전반)**
|
||||||
|
|
||||||
|
## 🧠 Skills의 본질 이해
|
||||||
|
|
||||||
|
### Anthropic이 밝힌 Skills의 4가지 목적
|
||||||
|
|
||||||
|
1. **컨텍스트 관리** - 번들 파일을 통해 "사실상 무제한" 컨텍스트
|
||||||
|
2. **재사용성** - "조합 가능한 리소스"로 팀 간 공유
|
||||||
|
3. **코드 실행 효율** - 토큰 생성 대신 스크립트 실행
|
||||||
|
4. **조직 지식 캡처** - "신입 사원을 위한 온보딩 가이드"
|
||||||
|
|
||||||
|
### Denote-Org Skills가 필요한 구체적 이유
|
||||||
|
|
||||||
|
#### 문제 1: Denote 파일명 = 특수 도메인 지식
|
||||||
|
```
|
||||||
|
20251021T105353--프로젝트-제목__llmlog_denote_orgmode.org
|
||||||
|
│ │ │
|
||||||
|
│ │ └─ 태그 (underscore)
|
||||||
|
│ └─ 한글 제목 (hyphen)
|
||||||
|
└─ Timestamp (Denote ID)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Skills 없이:** Claude가 매번 파일명 파싱 로직 생성 → **토큰 낭비**
|
||||||
|
**Skills 있으면:** `denote_parser.py` 한 번 작성, 재사용
|
||||||
|
|
||||||
|
#### 문제 2: 3,000 파일 검색 = 복잡한 절차
|
||||||
|
**Skills 없이:** 매번 `find ~/org -name "*ID*"` 실행 → **느림**
|
||||||
|
**Skills 있으면:** `denote_finder.py` 캐싱 → **즉시 반환**
|
||||||
|
|
||||||
|
#### 문제 3: 지식 그래프 = 복잡도 폭발
|
||||||
|
**Skills 없이:** 각 링크마다 파일 찾기, 2-hop 연결? → **토큰 폭발**
|
||||||
|
**Skills 있으면:** `denote_graph.py` 한 번 구축, 캐싱 → **즉시 반환**
|
||||||
|
|
||||||
|
#### 문제 4: Literate Programming = Emacs 동작 재현
|
||||||
|
**Skills 없이:** Claude가 `:tangle` 옵션 수동 파싱 → **구조 깨질 위험**
|
||||||
|
**Skills 있으면:** `org_execute.py` Emacs org-babel 재현 → **안전**
|
||||||
|
|
||||||
|
## 🏗️ 9개 레이어 "시간과정신의방" 생태계
|
||||||
|
|
||||||
|
이 프로젝트는 완전한 인간-AI 협업 시스템의 일부입니다:
|
||||||
|
|
||||||
|
### Layer 7: 지식 퍼블리싱
|
||||||
|
- **notes.junghanacs.com** (Quartz)
|
||||||
|
- 1,400+ org → markdown
|
||||||
|
- Public Digital Garden
|
||||||
|
|
||||||
|
### Layer 6: 에이전트 오케스트레이션
|
||||||
|
- **meta-config**
|
||||||
|
- 계층적 에이전트 (Meta ↔ Domain Agents)
|
||||||
|
- ACP + A2A + MCP (JSON-RPC 2.0)
|
||||||
|
|
||||||
|
### Layer 5a: 마이그레이션
|
||||||
|
- **memex-kb**
|
||||||
|
- Backend 중립 (Google Docs, Dooray, Confluence...)
|
||||||
|
- Denote 형식으로 통합
|
||||||
|
|
||||||
|
### Layer 5b: 삶의 타임라인
|
||||||
|
- **memacs-config**
|
||||||
|
- 시간 기반 통합 (수면, 작업, Git...)
|
||||||
|
- Memex 실현
|
||||||
|
|
||||||
|
### Layer 4: AI 메모리
|
||||||
|
- **claude-config**
|
||||||
|
- PARA 방법론
|
||||||
|
- Git 버전 관리
|
||||||
|
|
||||||
|
### Layer 3.5: RAG/Vector DB
|
||||||
|
- **embedding-config**
|
||||||
|
- Notion CS 9,477 블록
|
||||||
|
- 홈카메라 85% 해결률
|
||||||
|
|
||||||
|
### Layer 3: 지식 관리 (이 프로젝트!)
|
||||||
|
- **Zotero** (156k+ lines 서지)
|
||||||
|
- **denote-org Skills** (3,000+ 파일) 🆕
|
||||||
|
|
||||||
|
### Layer 2: 개발 환경
|
||||||
|
- **dotdoom-starter**
|
||||||
|
- 터미널 최적화
|
||||||
|
- 크로스 플랫폼 (Ubuntu/NixOS/Termux)
|
||||||
|
|
||||||
|
### Layer 1: 인프라
|
||||||
|
- **nixos-config**
|
||||||
|
- 선언적 환경
|
||||||
|
- 재현성 100%
|
||||||
|
|
||||||
|
## 🎓 연관 프로젝트
|
||||||
|
|
||||||
|
**시간과정신의방 (Hyperbolic Time Chamber) 생태계:**
|
||||||
|
- [nixos-config](https://github.com/junghan0611/nixos-config) - 선언적 인프라
|
||||||
|
- [doomemacs-config](https://github.com/junghan0611/doomemacs-config) - 터미널 최적화 Emacs
|
||||||
|
- [zotero-config](https://github.com/junghan0611/zotero-config) - AI 쿼리 가능한 서지 (156k+ lines)
|
||||||
|
|
||||||
|
**디지털 가든:** [notes.junghanacs.com](https://notes.junghanacs.com)
|
||||||
|
|
||||||
|
## 📚 리소스
|
||||||
|
|
||||||
|
- [Denote 패키지](https://protesilaos.com/emacs/denote) by Protesilaos Stavrou
|
||||||
|
- [Anthropic Skills 문서](https://support.claude.com/en/articles/12512176-what-are-skills)
|
||||||
|
- [Agent Skills 엔지니어링 블로그](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills)
|
||||||
|
- [Org-mode](https://orgmode.org/)
|
||||||
|
|
||||||
|
## 📄 라이선스
|
||||||
|
|
||||||
|
Apache 2.0 (Anthropic Skills 생태계와 호환)
|
||||||
|
|
||||||
|
## 🙏 감사
|
||||||
|
|
||||||
|
- **Anthropic** - Agent Skills 패러다임과 Life Sciences 청사진
|
||||||
|
- **Protesilaos Stavrou** - Denote 제작
|
||||||
|
- **Org-mode 커뮤니티** - 기반 기술
|
||||||
|
- **AIONS 클럽 인터내셔널** - 집단지성 비전
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**상태:** 🟡 개발 중 (0.1 public 릴리즈 목표)
|
||||||
|
**관리자:** [@junghan0611](https://github.com/junghan0611)
|
||||||
|
**생성일:** 2025-10-21
|
||||||
329
skills/junghan0611__org-mode-skills/README.md
Normal file
329
skills/junghan0611__org-mode-skills/README.md
Normal file
@@ -0,0 +1,329 @@
|
|||||||
|
# Denote-Org Skills for Claude
|
||||||
|
|
||||||
|
> **Bringing Anthropic's Life Sciences paradigm to Life Everything**
|
||||||
|
|
||||||
|
Comprehensive Denote PKM system support for Claude AI, validated with **3,000+ org files** in production knowledge bases.
|
||||||
|
|
||||||
|
**Denote-first. Org-mode powered. Life-scale proven.**
|
||||||
|
|
||||||
|
[](LICENSE)
|
||||||
|
[]()
|
||||||
|
[]()
|
||||||
|
|
||||||
|
## 🌟 Vision: Life Sciences → Life Everything
|
||||||
|
|
||||||
|
Anthropic proved that **domain context + AI = expert-level collaboration** with Life Sciences (PubMed, Benchling, 10x Genomics).
|
||||||
|
|
||||||
|
This project extends that paradigm from **Biology** to **Living**:
|
||||||
|
|
||||||
|
**Life Sciences (Biology)** → **Life Everything (Living)**
|
||||||
|
|
||||||
|
Just as Claude becomes a scientist with PubMed context, Claude becomes your **personal knowledge partner** with Denote context.
|
||||||
|
|
||||||
|
### The Pattern
|
||||||
|
|
||||||
|
| Domain | Context | Result |
|
||||||
|
|--------|---------|--------|
|
||||||
|
| **Anthropic** | PubMed (millions of papers) + Claude | Scientific AI |
|
||||||
|
| **This Project** | Denote (3,000+ org files) + Claude | Personal Knowledge AI |
|
||||||
|
|
||||||
|
**Same methodology. Different domain. Universal paradigm.**
|
||||||
|
|
||||||
|
## Why This is a Skill, Not Just a Prompt
|
||||||
|
|
||||||
|
**Anthropic's Skills Philosophy:**
|
||||||
|
|
||||||
|
> "Skills transform Claude from a general-purpose agent into a specialized agent equipped with **procedural knowledge** that no model can fully possess."
|
||||||
|
>
|
||||||
|
> — [Equipping agents for the real world with Agent Skills](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills)
|
||||||
|
|
||||||
|
**Just like:**
|
||||||
|
- **PDF Skill** solves complex forms (8 Python scripts for bounding boxes, validation...)
|
||||||
|
- **XLSX Skill** maintains formulas (recalc.py with LibreOffice integration)
|
||||||
|
- **Denote-Org Skill** handles 3,000-file knowledge graphs (finder, graph builder, silo manager)
|
||||||
|
|
||||||
|
**Skills are NOT prompts. They are operational systems.**
|
||||||
|
|
||||||
|
## The Problem This Solves
|
||||||
|
|
||||||
|
### Without This Skill
|
||||||
|
|
||||||
|
❌ Claude doesn't know Denote file naming: `20251021T105353--title__tags.org`
|
||||||
|
❌ Finding files in 3,000+ requires repeated token-heavy searches
|
||||||
|
❌ Knowledge graph navigation is slow and error-prone
|
||||||
|
❌ Literate programming (`:tangle`, `:results`) often breaks org structure
|
||||||
|
❌ Multiple silos (`~/org/`, `~/claude-memory/`) cause confusion
|
||||||
|
|
||||||
|
### With This Skill
|
||||||
|
|
||||||
|
✅ **Denote domain knowledge** bundled (file naming, frontmatter, links)
|
||||||
|
✅ **Python scripts** for efficient operations (finder, graph, executor)
|
||||||
|
✅ **Knowledge graph** cached and reusable
|
||||||
|
✅ **Safe code execution** (org-babel compatible)
|
||||||
|
✅ **Silo management** (multiple knowledge domains)
|
||||||
|
|
||||||
|
**Not a file converter. An operational knowledge system.**
|
||||||
|
|
||||||
|
## 🎯 What is Denote?
|
||||||
|
|
||||||
|
Denote is a **simple yet powerful** note-taking system for Emacs:
|
||||||
|
|
||||||
|
- **File naming convention**: `YYYYMMDDTHHMMSS--title__tag1_tag2.org`
|
||||||
|
- **Knowledge graph**: `[[denote:TIMESTAMP]]` links
|
||||||
|
- **Silo concept**: Separate directories for different knowledge domains
|
||||||
|
- **Org-mode foundation**: Headings, properties, timestamps, code blocks
|
||||||
|
|
||||||
|
**Created by:** [Protesilaos Stavrou](https://protesilaos.com/emacs/denote)
|
||||||
|
|
||||||
|
## 📊 Scale: Production-Validated
|
||||||
|
|
||||||
|
This skill is built for **real-world PKM systems**, not toy examples:
|
||||||
|
|
||||||
|
- ✅ **3,000+ org files** (validated at scale)
|
||||||
|
- ✅ **Multiple silos** (`~/org/`, `~/claude-memory/`, project `docs/`)
|
||||||
|
- ✅ **Denote knowledge graph** (thousands of `[[denote:ID]]` links)
|
||||||
|
- ✅ **Daily usage** with Claude Code
|
||||||
|
- ✅ **Part of 9-layer "Tools for Life" system**
|
||||||
|
|
||||||
|
## 🏗️ Part of the 9-Layer System
|
||||||
|
|
||||||
|
This skill is **Layer 3** (Knowledge Understanding) in a complete AI-human collaboration architecture:
|
||||||
|
|
||||||
|
```
|
||||||
|
Layer 7: Knowledge Publishing (notes.junghanacs.com)
|
||||||
|
Layer 6: Agent Orchestration (meta-config)
|
||||||
|
Layer 5a: Migration (memex-kb)
|
||||||
|
Layer 5b: Life Timeline (memacs-config)
|
||||||
|
Layer 4: AI Memory (claude-config)
|
||||||
|
Layer 3.5: RAG/Vector DB (embedding-config)
|
||||||
|
Layer 3: Knowledge Mgmt (Zotero, denote-org 🆕)
|
||||||
|
Layer 2: Dev Environment (Doom Emacs)
|
||||||
|
Layer 1: Infrastructure (NixOS)
|
||||||
|
```
|
||||||
|
|
||||||
|
**Related projects:**
|
||||||
|
- [claude-config](https://github.com/junghan0611/claude-config) - AI Memory System with PARA methodology
|
||||||
|
- [memex-kb](https://github.com/junghan0611/memex-kb) - Universal KB Migration (Google Docs, Dooray...)
|
||||||
|
- [embedding-config](https://github.com/junghan0611/embedding-config) - Vector RAG (9,477 blocks, 85% success rate)
|
||||||
|
|
||||||
|
**Philosophy:** Same as Anthropic Life Sciences - **AI as Partner, not Tool**
|
||||||
|
|
||||||
|
## 🚀 Real Use Cases
|
||||||
|
|
||||||
|
### Case 1: Knowledge Graph Navigation
|
||||||
|
```bash
|
||||||
|
User: "Find all files linked to 20251021T105353"
|
||||||
|
Claude: Uses denote_graph.py
|
||||||
|
Result: Connected files in <1 second (not repeated token searches)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Case 2: Tag-based Search Across 3,000 Files
|
||||||
|
```bash
|
||||||
|
User: "All llmlog files from October 2025"
|
||||||
|
Claude: Uses denote_finder.py --tags llmlog --date 202510*
|
||||||
|
Result: Instant results with metadata
|
||||||
|
```
|
||||||
|
|
||||||
|
### Case 3: Silo Management
|
||||||
|
```bash
|
||||||
|
User: "Is this in ~/org/ or ~/claude-memory/?"
|
||||||
|
Claude: Uses denote_silo.py find_in_silos()
|
||||||
|
Result: Resolves ambiguity automatically
|
||||||
|
```
|
||||||
|
|
||||||
|
### Case 4: Literate Programming
|
||||||
|
```bash
|
||||||
|
User: "Execute code blocks in this org file"
|
||||||
|
Claude: Uses org_execute.py (org-babel compatible)
|
||||||
|
Result: Safe execution, structure preserved, :results updated
|
||||||
|
```
|
||||||
|
|
||||||
|
### Case 5: Denote Link Resolution
|
||||||
|
```bash
|
||||||
|
File contains: [[denote:20251021T105353]]
|
||||||
|
Claude: Uses denote_links.py resolve_link()
|
||||||
|
Result: ~/org/llmlog/20251021T105353--full-filename.org
|
||||||
|
```
|
||||||
|
|
||||||
|
## 💡 Features
|
||||||
|
|
||||||
|
### Denote Core
|
||||||
|
- ✅ File naming: `20251021T105353--title__tag1_tag2.org`
|
||||||
|
- ✅ Frontmatter parsing (title, date, filetags, identifier)
|
||||||
|
- ✅ Link resolution (`[[denote:ID]]`)
|
||||||
|
- ✅ Tag-based search
|
||||||
|
- ✅ Silo management (multiple knowledge domains)
|
||||||
|
- ✅ Knowledge graph (3,000+ files validated)
|
||||||
|
|
||||||
|
### Org-mode Base
|
||||||
|
- ✅ Heading/property parsing
|
||||||
|
- ✅ Code block execution (literate programming)
|
||||||
|
- ✅ Timestamp handling
|
||||||
|
- ✅ Export (markdown, PDF, HTML)
|
||||||
|
- ✅ Table operations
|
||||||
|
|
||||||
|
### Performance
|
||||||
|
- ✅ Python scripts (not token generation)
|
||||||
|
- ✅ Caching for repeated operations
|
||||||
|
- ✅ Efficient graph traversal
|
||||||
|
- ✅ Batch processing support
|
||||||
|
|
||||||
|
## 📦 Installation
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
```bash
|
||||||
|
# Python 3.8+
|
||||||
|
pip install orgparse pypandoc pyyaml
|
||||||
|
|
||||||
|
# Pandoc (for export)
|
||||||
|
# Install via your package manager
|
||||||
|
```
|
||||||
|
|
||||||
|
### Claude Code
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/junghan0611/orgmode-skills.git
|
||||||
|
cd orgmode-skills
|
||||||
|
/plugin add .
|
||||||
|
```
|
||||||
|
|
||||||
|
### Claude API
|
||||||
|
```python
|
||||||
|
# See API documentation for skills integration
|
||||||
|
import anthropic
|
||||||
|
|
||||||
|
client = anthropic.Client(api_key="your-api-key")
|
||||||
|
# Skills API usage
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🔧 Quick Start
|
||||||
|
|
||||||
|
### Example 1: Find Denote File
|
||||||
|
```python
|
||||||
|
from scripts.denote_finder import find_denote_file
|
||||||
|
|
||||||
|
# By identifier
|
||||||
|
filepath = find_denote_file("20251021T105353", silos=["~/org/"])
|
||||||
|
# Returns: ~/org/llmlog/20251021T105353--full-filename.org
|
||||||
|
|
||||||
|
# By tags
|
||||||
|
files = find_by_tags(["llmlog", "denote"], silo="~/org/")
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example 2: Extract Knowledge Graph
|
||||||
|
```python
|
||||||
|
from scripts.denote_graph import build_knowledge_graph, get_connected_nodes
|
||||||
|
|
||||||
|
# Build graph (cached)
|
||||||
|
graph = build_knowledge_graph("~/org/")
|
||||||
|
|
||||||
|
# Get connected files
|
||||||
|
connected = get_connected_nodes("20251021T105353", hops=2)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example 3: Execute Org Code Blocks
|
||||||
|
```python
|
||||||
|
from scripts.org_execute import execute_org_blocks
|
||||||
|
|
||||||
|
# Execute all code blocks (respects :tangle, :results)
|
||||||
|
results = execute_org_blocks("file.org")
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📂 Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
orgmode-skills/
|
||||||
|
├── README.md # This file
|
||||||
|
├── README-KO.md # Korean version
|
||||||
|
├── LICENSE # Apache 2.0
|
||||||
|
├── SKILL.md # Claude's main guide
|
||||||
|
├── docs/ # Development logs (Denote format)
|
||||||
|
│ └── 20251021T113500--*.org
|
||||||
|
├── denote-core.md # Denote specification
|
||||||
|
├── denote-silo.md # Silo management
|
||||||
|
├── denote-knowledge-graph.md # Graph operations
|
||||||
|
├── orgmode-base.md # Org-mode features
|
||||||
|
├── literate.md # Literate programming
|
||||||
|
├── export.md # Export capabilities
|
||||||
|
└── scripts/
|
||||||
|
├── denote_finder.py # File search
|
||||||
|
├── denote_links.py # Link resolution
|
||||||
|
├── denote_silo.py # Silo management
|
||||||
|
├── denote_graph.py # Knowledge graph
|
||||||
|
├── org_parser.py # Org parsing
|
||||||
|
├── org_execute.py # Code execution
|
||||||
|
├── org_export.py # Export
|
||||||
|
└── requirements.txt
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🗺️ Roadmap to 0.1
|
||||||
|
|
||||||
|
**Phase 1: Core (Current)**
|
||||||
|
- [x] Project setup
|
||||||
|
- [ ] README.md, README-KO.md
|
||||||
|
- [ ] Development log (docs/)
|
||||||
|
- [ ] SKILL.md (Denote-focused)
|
||||||
|
|
||||||
|
**Phase 2: Denote Core**
|
||||||
|
- [ ] denote_finder.py (file search)
|
||||||
|
- [ ] denote_links.py (link resolution)
|
||||||
|
- [ ] denote_silo.py (silo management)
|
||||||
|
- [ ] denote-core.md documentation
|
||||||
|
|
||||||
|
**Phase 3: Org-mode Base**
|
||||||
|
- [ ] org_parser.py (orgparse)
|
||||||
|
- [ ] org_execute.py (code blocks)
|
||||||
|
- [ ] orgmode-base.md documentation
|
||||||
|
|
||||||
|
**Phase 4: 0.1 Release**
|
||||||
|
- [ ] Testing with 3,000+ files
|
||||||
|
- [ ] Examples
|
||||||
|
- [ ] Public release
|
||||||
|
|
||||||
|
## 🤝 Contributing
|
||||||
|
|
||||||
|
This project is validated with real-world 3,000+ file Denote PKM systems. Denote users welcome!
|
||||||
|
|
||||||
|
## 📖 Philosophy: Tools for Life
|
||||||
|
|
||||||
|
**From the creator:**
|
||||||
|
|
||||||
|
> "저에게 필요한 것은 경쟁력 있는 지식 노동자로 살 수 있는 방법이었습니다."
|
||||||
|
>
|
||||||
|
> "도구는 존재에 녹아든다"
|
||||||
|
|
||||||
|
This skill embodies the "Tools for Life" philosophy - extending Anthropic's Life Sciences approach from biology research to personal knowledge work.
|
||||||
|
|
||||||
|
**Life Sciences (Biology)** → **Life Everything (Living)**
|
||||||
|
|
||||||
|
## 📚 Resources
|
||||||
|
|
||||||
|
- [Denote Package](https://protesilaos.com/emacs/denote) by Protesilaos Stavrou
|
||||||
|
- [Anthropic Skills Documentation](https://support.claude.com/en/articles/12512176-what-are-skills)
|
||||||
|
- [Agent Skills Engineering Blog](https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills)
|
||||||
|
- [Org-mode](https://orgmode.org/)
|
||||||
|
|
||||||
|
## 🔗 Related Projects
|
||||||
|
|
||||||
|
Part of the **"시간과정신의방" (Hyperbolic Time Chamber)** ecosystem:
|
||||||
|
- [nixos-config](https://github.com/junghan0611/nixos-config) - Declarative infrastructure
|
||||||
|
- [doomemacs-config](https://github.com/junghan0611/doomemacs-config) - Terminal-optimized Emacs
|
||||||
|
- [zotero-config](https://github.com/junghan0611/zotero-config) - AI-queryable bibliography (156k+ lines)
|
||||||
|
|
||||||
|
**Digital Garden:** [notes.junghanacs.com](https://notes.junghanacs.com)
|
||||||
|
|
||||||
|
## 📄 License
|
||||||
|
|
||||||
|
Apache 2.0 (compatible with Anthropic Skills ecosystem)
|
||||||
|
|
||||||
|
## 🙏 Acknowledgments
|
||||||
|
|
||||||
|
- **Anthropic** for the Agent Skills paradigm and Life Sciences blueprint
|
||||||
|
- **Protesilaos Stavrou** for creating Denote
|
||||||
|
- **Org-mode community** for the foundation
|
||||||
|
- **AIONS Clubs International** for the vision of collective intelligence
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Status:** 🟡 Development (targeting 0.1 public release)
|
||||||
|
**Maintainer:** [@junghan0611](https://github.com/junghan0611)
|
||||||
|
**Created:** 2025-10-21
|
||||||
432
skills/junghan0611__org-mode-skills/SKILL.md
Normal file
432
skills/junghan0611__org-mode-skills/SKILL.md
Normal file
@@ -0,0 +1,432 @@
|
|||||||
|
---
|
||||||
|
name: denote-org
|
||||||
|
description: "Comprehensive support for Denote-based PKM systems with org-mode foundation. Handles 3,000+ file knowledge bases with Denote file naming (timestamp--title__tags.org), knowledge graph navigation via [[denote:ID]] links, multi-silo management, and literate programming. When Claude needs to: (1) Find Denote files by ID/tags in large knowledge bases, (2) Navigate knowledge graphs with thousands of [[denote:]] links, (3) Execute org-mode code blocks with :tangle/:results options, (4) Manage multiple Denote silos (~/org/, ~/claude-memory/...), or (5) Work with Denote-structured PKM systems at scale."
|
||||||
|
---
|
||||||
|
|
||||||
|
# Denote-Org Skills
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This skill enables Claude to work with Denote-based Personal Knowledge Management (PKM) systems at scale. Denote is a simple yet powerful note-taking system for Emacs that combines file naming conventions, org-mode structure, and knowledge graph links. This skill provides procedural knowledge and executable scripts for handling 3,000+ file knowledge bases efficiently.
|
||||||
|
|
||||||
|
## When to Use This Skill
|
||||||
|
|
||||||
|
Claude should use this skill when:
|
||||||
|
|
||||||
|
1. **Working with Denote files** - Files named `YYYYMMDDTHHMMSS--title__tag1_tag2.org`
|
||||||
|
2. **Large-scale PKM systems** - Knowledge bases with hundreds or thousands of org files
|
||||||
|
3. **Knowledge graph navigation** - Following `[[denote:TIMESTAMP]]` links across files
|
||||||
|
4. **Multi-silo management** - Searching across multiple Denote directories (~/org/, ~/claude-memory/, project docs/)
|
||||||
|
5. **Literate programming** - Executing org-mode code blocks with `:tangle` and `:results` options
|
||||||
|
6. **Denote metadata extraction** - Parsing file names and org-mode frontmatter
|
||||||
|
7. **Org-mode as primary collaboration format** - When both `.org` and `.md` exist for the same content, treat the org file as the primary, authoritative source and use markdown only as an export/share format.
|
||||||
|
|
||||||
|
## What is Denote?
|
||||||
|
|
||||||
|
Denote is a note-taking system created by Protesilaos Stavrou that uses:
|
||||||
|
|
||||||
|
- **File naming**: `YYYYMMDDTHHMMSS--title__tag1_tag2.org`
|
||||||
|
- Timestamp = Unique identifier (Denote ID)
|
||||||
|
- Title = Hyphen-separated (supports 한글/Korean)
|
||||||
|
- Tags = Underscore-separated (English)
|
||||||
|
|
||||||
|
- **Org-mode frontmatter**:
|
||||||
|
```org
|
||||||
|
#+title: Title
|
||||||
|
#+date: [2025-10-21 Tue 10:53]
|
||||||
|
#+filetags: :tag1:tag2:tag3:
|
||||||
|
#+identifier: 20251021T105353
|
||||||
|
```
|
||||||
|
|
||||||
|
- **Knowledge graph**: `[[denote:20251021T105353]]` links between files
|
||||||
|
|
||||||
|
- **Silo concept**: Separate directories for different knowledge domains
|
||||||
|
|
||||||
|
**Validated with 3,000+ org files in production PKM systems.**
|
||||||
|
|
||||||
|
## Core Capabilities
|
||||||
|
|
||||||
|
> **Important behavioral rule:** When the user explicitly asks to "read" or "understand" an org-mode document, do not immediately fall back to raw grep searches unless the user asks for grep specifically. First, use the structured org-mode reading strategy below (headings → history → focused sections) and only then use grep as a secondary tool.
|
||||||
|
|
||||||
|
### 1. Denote File Name Parsing
|
||||||
|
|
||||||
|
Parse Denote file names to extract metadata:
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Use scripts/denote_parser.py
|
||||||
|
from scripts.denote_parser import parse_denote_filename
|
||||||
|
|
||||||
|
metadata = parse_denote_filename("20251021T105353--project-title__llmlog_denote.org")
|
||||||
|
# Returns:
|
||||||
|
# {
|
||||||
|
# 'timestamp': '20251021T105353',
|
||||||
|
# 'title': 'project title',
|
||||||
|
# 'tags': ['llmlog', 'denote'],
|
||||||
|
# 'extension': 'org'
|
||||||
|
# }
|
||||||
|
```
|
||||||
|
|
||||||
|
**When to use:**
|
||||||
|
- Extracting Denote ID from filename
|
||||||
|
- Getting title and tags without opening file
|
||||||
|
- Processing multiple files in batch
|
||||||
|
|
||||||
|
**Edge cases handled:**
|
||||||
|
- Korean (한글) titles
|
||||||
|
- Filenames without tags
|
||||||
|
- Multiple hyphens in title
|
||||||
|
|
||||||
|
### 2. Finding Denote Files
|
||||||
|
|
||||||
|
Search for Denote files by ID, tags, or date patterns:
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Use scripts/denote_finder.py
|
||||||
|
from scripts.denote_finder import find_denote_file, find_by_tags
|
||||||
|
|
||||||
|
# Find by ID
|
||||||
|
filepath = find_denote_file("20251021T105353", silos=["~/org/"])
|
||||||
|
|
||||||
|
# Find by tags
|
||||||
|
files = find_by_tags(["llmlog", "denote"], silo="~/org/")
|
||||||
|
|
||||||
|
# Find by date pattern
|
||||||
|
files = find_by_date_range("202510*", silo="~/org/")
|
||||||
|
```
|
||||||
|
|
||||||
|
**When to use:**
|
||||||
|
- User asks "Find file 20251021T105353"
|
||||||
|
- Search by tags: "Show me all llmlog files"
|
||||||
|
- Date range queries: "Files from October 2025"
|
||||||
|
|
||||||
|
**Performance:**
|
||||||
|
- Uses caching for repeated searches
|
||||||
|
- Generator pattern for large result sets
|
||||||
|
- Typical search: <100ms for 3,000+ files
|
||||||
|
|
||||||
|
### 3. Denote Link Resolution
|
||||||
|
|
||||||
|
Resolve `[[denote:ID]]` links to actual file paths:
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Use scripts/denote_links.py
|
||||||
|
from scripts.denote_links import resolve_denote_link
|
||||||
|
|
||||||
|
filepath = resolve_denote_link("denote:20251021T105353", silos=["~/org/", "~/claude-memory/"])
|
||||||
|
# Returns: ~/org/llmlog/20251021T105353--full-filename.org
|
||||||
|
```
|
||||||
|
|
||||||
|
**When to use:**
|
||||||
|
- File contains `[[denote:...]]` links
|
||||||
|
- Need to open linked files
|
||||||
|
- Validate link integrity
|
||||||
|
|
||||||
|
**Error recovery:**
|
||||||
|
- Exact match (full timestamp)
|
||||||
|
- Fallback: Partial match (first 8 chars)
|
||||||
|
- Returns suggestions if not found
|
||||||
|
|
||||||
|
### 4. Knowledge Graph Operations
|
||||||
|
|
||||||
|
Build and navigate knowledge graphs from Denote links:
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Use scripts/denote_graph.py
|
||||||
|
from scripts.denote_graph import build_knowledge_graph, get_connected_nodes
|
||||||
|
|
||||||
|
# Build graph (cached)
|
||||||
|
graph = build_knowledge_graph("~/org/")
|
||||||
|
|
||||||
|
# Get connected files
|
||||||
|
connected = get_connected_nodes("20251021T105353", hops=2)
|
||||||
|
|
||||||
|
# Detect circular references
|
||||||
|
cycles = detect_circular_refs(graph)
|
||||||
|
```
|
||||||
|
|
||||||
|
**When to use:**
|
||||||
|
- "Show files linked to this"
|
||||||
|
- "Find related notes"
|
||||||
|
- Discover knowledge clusters
|
||||||
|
- Detect broken or circular links
|
||||||
|
|
||||||
|
**Performance:**
|
||||||
|
- First build: ~10 seconds for 3,000 files
|
||||||
|
- Cached: <1 second
|
||||||
|
- Incremental updates supported
|
||||||
|
|
||||||
|
### 5. Multi-Silo Management
|
||||||
|
|
||||||
|
#### 5.1 Preferred org-mode reading strategy
|
||||||
|
|
||||||
|
When working with org-mode files in this environment, follow this structured process instead of treating them as plain text:
|
||||||
|
|
||||||
|
1. **Identify org-context and silos**
|
||||||
|
- If a file path matches any of the following, assume it is part of a Denote/org knowledge base and prefer org-mode behavior over ad-hoc grep:
|
||||||
|
- `~/org/**`
|
||||||
|
- `~/org/meta/**`
|
||||||
|
- `~/org/bib/**`
|
||||||
|
- `~/org/notes/**`
|
||||||
|
- `~/org/llmlog/**`
|
||||||
|
- `~/claude-memory/**`
|
||||||
|
- `~/repos/gh/*/docs/**`
|
||||||
|
- `~/repos/work/*/docs/**`
|
||||||
|
- Treat these as **silos** with different roles:
|
||||||
|
- `~/org/meta` : meta-level models, config, and system design
|
||||||
|
- `~/org/bib` : bibliography and reference material
|
||||||
|
- `~/org/notes` : long-form notes and thinking
|
||||||
|
- `~/org/llmlog`: LLM conversation logs and experiments
|
||||||
|
- project `docs/`: per-repo documentation tied to code
|
||||||
|
|
||||||
|
2. **Parse headings before content**
|
||||||
|
- For large org files, do not read the entire file into context at once.
|
||||||
|
- Instead, first extract only:
|
||||||
|
- The top-level headings (`*`, `**`, `***`)
|
||||||
|
- Their titles and hierarchy
|
||||||
|
- Build a lightweight table of contents (TOC) and use that to decide which sections to inspect in detail.
|
||||||
|
|
||||||
|
3. **Locate and summarize history sections early**
|
||||||
|
- If any heading matches common history patterns, treat it as a version/change log and inspect it early:
|
||||||
|
- `* 히스토리`, `* HISTORY`, `* History`, `* 작업 로그`, `* Changelog`, or similar
|
||||||
|
- Summarize:
|
||||||
|
- How the document has evolved over time
|
||||||
|
- Recent significant changes
|
||||||
|
- Any explicit version markers or dates
|
||||||
|
|
||||||
|
4. **Drill down into relevant sections only**
|
||||||
|
- After building the TOC and understanding history, only expand the specific headings that are relevant to the current task or user question.
|
||||||
|
- Use grep/rg as a **secondary tool** to locate candidate sections, then return to structured org parsing for interpretation.
|
||||||
|
|
||||||
|
5. **Prefer org over markdown when both exist**
|
||||||
|
- If both `X.org` and `X.md` exist for the same conceptual document:
|
||||||
|
- Treat `X.org` as canonical for structure, metadata, and detailed reasoning.
|
||||||
|
- Use `X.md` only as an export/share artifact or when the user explicitly prefers markdown.
|
||||||
|
|
||||||
|
This strategy exists to maximize collaboration on org documents as first-class knowledge artifacts, not just as flat text blobs.
|
||||||
|
|
||||||
|
|
||||||
|
Search across multiple Denote directories:
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Use scripts/denote_silo.py
|
||||||
|
from scripts.denote_silo import find_in_silos
|
||||||
|
|
||||||
|
# Search in multiple locations
|
||||||
|
filepath = find_in_silos(
|
||||||
|
"20251021T105353",
|
||||||
|
silos=["~/org/", "~/claude-memory/", "~/repos/*/docs/"],
|
||||||
|
priority=True # Return first match
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
**When to use:**
|
||||||
|
- Files could be in multiple locations
|
||||||
|
- Cross-silo link resolution
|
||||||
|
- Silo statistics and analysis
|
||||||
|
|
||||||
|
**Common silos:**
|
||||||
|
- `~/org/` - Main knowledge base (3,000+ files)
|
||||||
|
- `~/claude-memory/` - AI memory system
|
||||||
|
- `~/repos/*/docs/` - Project-specific docs
|
||||||
|
|
||||||
|
### 6. Org-mode Code Block Execution
|
||||||
|
|
||||||
|
Execute org-mode code blocks (literate programming):
|
||||||
|
|
||||||
|
```python
|
||||||
|
# Use scripts/org_execute.py
|
||||||
|
from scripts.org_execute import execute_org_blocks
|
||||||
|
|
||||||
|
# Execute all code blocks
|
||||||
|
results = execute_org_blocks("file.org")
|
||||||
|
|
||||||
|
# Execute specific named block
|
||||||
|
result = execute_named_block("file.org", "example-block")
|
||||||
|
|
||||||
|
# Tangle code to files
|
||||||
|
tangle_org_file("file.org", output_dir="/tmp/")
|
||||||
|
```
|
||||||
|
|
||||||
|
**When to use:**
|
||||||
|
- User asks to "execute code blocks"
|
||||||
|
- Literate programming workflows
|
||||||
|
- Generate files from `:tangle` options
|
||||||
|
|
||||||
|
**Org-babel compatibility:**
|
||||||
|
- Supports `:tangle`, `:results`, `:name` options
|
||||||
|
- Languages: bash, python, etc.
|
||||||
|
- Preserves org structure
|
||||||
|
- Updates `#+RESULTS` blocks
|
||||||
|
|
||||||
|
## Quick Start Examples
|
||||||
|
|
||||||
|
### Example 1: Find and Open Denote File
|
||||||
|
|
||||||
|
```
|
||||||
|
User: "Open file 20251021T105353"
|
||||||
|
|
||||||
|
Claude: Uses denote_finder.py
|
||||||
|
Result: ~/org/llmlog/20251021T105353--anthropic-skill-creator-분석__llmlog_skills.org
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example 2: Knowledge Graph Exploration
|
||||||
|
|
||||||
|
```
|
||||||
|
User: "Show me all files connected to this note"
|
||||||
|
|
||||||
|
Claude: Uses denote_graph.py
|
||||||
|
Result:
|
||||||
|
- Direct links: 5 files
|
||||||
|
- 2-hop connections: 23 files
|
||||||
|
- Clusters: AI/Skills, PKM, Tools for Life
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example 3: Tag-based Search
|
||||||
|
|
||||||
|
```
|
||||||
|
User: "Find all llmlog files from October 2025"
|
||||||
|
|
||||||
|
Claude: Uses denote_finder.py
|
||||||
|
Result: 47 files matching criteria
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example 4: Execute Literate Programming
|
||||||
|
|
||||||
|
```
|
||||||
|
User: "Execute the bash blocks in this org file"
|
||||||
|
|
||||||
|
Claude: Uses org_execute.py
|
||||||
|
Result:
|
||||||
|
- Executed 3 code blocks
|
||||||
|
- Updated #+RESULTS
|
||||||
|
- Tangled to /tmp/script.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
## Common Pitfalls
|
||||||
|
|
||||||
|
### Pitfall 1: Denote ID Collision
|
||||||
|
**Problem:** Files created in same second have identical timestamps
|
||||||
|
**Solution:** Scripts use full filename as tiebreaker
|
||||||
|
|
||||||
|
### Pitfall 2: Cross-Silo Links
|
||||||
|
**Problem:** Link from ~/org/ to ~/claude-memory/ file
|
||||||
|
**Solution:** Always search multiple silos, use `find_in_silos()`
|
||||||
|
|
||||||
|
### Pitfall 3: Circular References
|
||||||
|
**Problem:** A → B → C → A creates cycle in knowledge graph
|
||||||
|
**Solution:** `detect_circular_refs()` identifies cycles
|
||||||
|
|
||||||
|
### Pitfall 4: Korean Encoding
|
||||||
|
**Problem:** 한글 filenames may cause encoding issues
|
||||||
|
**Solution:** All scripts use UTF-8, `os.path.expanduser()`
|
||||||
|
|
||||||
|
### Pitfall 5: Large Result Sets
|
||||||
|
**Problem:** Query returns 1,000+ files, exceeds token limit
|
||||||
|
**Solution:** Scripts use generators, return summary + pagination
|
||||||
|
|
||||||
|
## File Structure
|
||||||
|
|
||||||
|
This skill uses a **Capabilities-Based** structure with executable scripts and reference documentation:
|
||||||
|
|
||||||
|
```
|
||||||
|
denote-org/
|
||||||
|
├── SKILL.md (this file)
|
||||||
|
├── scripts/
|
||||||
|
│ ├── denote_parser.py - Parse filenames and frontmatter
|
||||||
|
│ ├── denote_finder.py - Search files (cached, generator)
|
||||||
|
│ ├── denote_links.py - Resolve [[denote:ID]] links
|
||||||
|
│ ├── denote_silo.py - Multi-silo management
|
||||||
|
│ ├── denote_graph.py - Knowledge graph operations
|
||||||
|
│ ├── org_parser.py - Parse org structure
|
||||||
|
│ ├── org_execute.py - Execute code blocks
|
||||||
|
│ └── org_export.py - Export to markdown/PDF/HTML
|
||||||
|
├── references/
|
||||||
|
│ ├── denote-spec.md - Denote specification
|
||||||
|
│ ├── orgmode-syntax.md - Org-mode syntax reference
|
||||||
|
│ └── literate-programming.md - Literate programming guide
|
||||||
|
└── assets/
|
||||||
|
└── (none - this skill doesn't use output templates)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
### scripts/
|
||||||
|
|
||||||
|
Executable Python scripts for efficient Denote and org-mode operations. These scripts handle:
|
||||||
|
|
||||||
|
- **File operations**: Finding, parsing, and resolving links across 3,000+ files
|
||||||
|
- **Graph operations**: Building and navigating knowledge graphs
|
||||||
|
- **Code execution**: Running org-babel blocks safely
|
||||||
|
- **Export**: Converting org to other formats
|
||||||
|
|
||||||
|
**Performance optimized:**
|
||||||
|
- Caching with `@lru_cache` for expensive operations
|
||||||
|
- Generator pattern for memory efficiency
|
||||||
|
- Typical operations: <100ms (finder), <1s (graph, cached)
|
||||||
|
|
||||||
|
### references/
|
||||||
|
|
||||||
|
Detailed documentation for Denote and org-mode:
|
||||||
|
|
||||||
|
- **denote-spec.md**: Complete Denote specification (file naming, frontmatter, links, silos)
|
||||||
|
- **orgmode-syntax.md**: Org-mode syntax reference (headings, properties, timestamps, code blocks)
|
||||||
|
- **literate-programming.md**: Literate programming with org-babel (`:tangle`, `:results`, `:name`)
|
||||||
|
|
||||||
|
**Load these when:**
|
||||||
|
- Working with complex org structures
|
||||||
|
- Need detailed Denote specification
|
||||||
|
- Implementing literate programming workflows
|
||||||
|
|
||||||
|
### assets/
|
||||||
|
|
||||||
|
Not used in this skill. Denote-org processes existing files rather than creating from templates.
|
||||||
|
|
||||||
|
**Note:** The `assets/` directory can be deleted as it's not needed for this skill.
|
||||||
|
|
||||||
|
## Integration with Other Systems
|
||||||
|
|
||||||
|
This skill is part of the **"Tools for Life" 9-layer architecture**, specifically Layer 3 (Knowledge Management):
|
||||||
|
|
||||||
|
- **Layer 4 (claude-config)**: Uses Denote format for AI memory (~/claude-memory/)
|
||||||
|
- **Layer 3.5 (embedding-config)**: Vectorizes org files for semantic search
|
||||||
|
- **Layer 5a (memex-kb)**: Migrates to Denote format
|
||||||
|
- **Layer 7 (notes)**: Exports Denote org → markdown for publishing
|
||||||
|
|
||||||
|
**Philosophy:** Extends Anthropic's Life Sciences paradigm (domain context + AI = expert collaboration) from Biology research to personal knowledge work.
|
||||||
|
|
||||||
|
## Performance Considerations
|
||||||
|
|
||||||
|
When working with 3,000+ files:
|
||||||
|
|
||||||
|
- **Caching**: Graph building is cached (10s first time, <1s after)
|
||||||
|
- **Generators**: Large searches use streaming (memory efficient)
|
||||||
|
- **Timeouts**: Long operations have configurable limits
|
||||||
|
- **Pagination**: Large result sets are paginated automatically
|
||||||
|
|
||||||
|
## Troubleshooting
|
||||||
|
|
||||||
|
### Links Not Resolving
|
||||||
|
- Check if file exists in specified silos
|
||||||
|
- Try partial match (first 8 chars of timestamp)
|
||||||
|
- Verify silo paths use `os.path.expanduser()`
|
||||||
|
|
||||||
|
### Graph Building Slow
|
||||||
|
- First build takes ~10 seconds for 3,000 files (normal)
|
||||||
|
- Subsequent builds use cache (<1 second)
|
||||||
|
- Use incremental update for changed files only
|
||||||
|
|
||||||
|
### Code Block Execution Fails
|
||||||
|
- Check `:tangle` path exists
|
||||||
|
- Verify code block language support
|
||||||
|
- Review `:results` option syntax
|
||||||
|
|
||||||
|
### Encoding Errors
|
||||||
|
- All scripts use UTF-8
|
||||||
|
- Korean (한글) filenames fully supported
|
||||||
|
- File paths expanded with `os.path.expanduser()`
|
||||||
|
|
||||||
|
## See Also
|
||||||
|
|
||||||
|
- [Denote Package](https://protesilaos.com/emacs/denote) by Protesilaos Stavrou
|
||||||
|
- [Org-mode](https://orgmode.org/) documentation
|
||||||
|
- README.md in this repository for project context and Life Sciences paradigm connection
|
||||||
643
skills/junghan0611__org-mode-skills/TODO.org
Normal file
643
skills/junghan0611__org-mode-skills/TODO.org
Normal file
@@ -0,0 +1,643 @@
|
|||||||
|
#+title: Denote-Org Skills TODO
|
||||||
|
#+date: [2025-10-21 Tue 11:58]
|
||||||
|
#+filetags: :project:todo:
|
||||||
|
#+startup: overview
|
||||||
|
|
||||||
|
* Denote-Org Skills 0.1 Release Roadmap
|
||||||
|
|
||||||
|
** DONE Project Setup
|
||||||
|
CLOSED: [2025-10-21 Tue 11:56]
|
||||||
|
- [X] Create repository (~/repos/gh/orgmode-skills)
|
||||||
|
- [X] README.md (English)
|
||||||
|
- [X] README-KO.md (Korean)
|
||||||
|
- [X] LICENSE (Apache 2.0)
|
||||||
|
- [X] .gitignore
|
||||||
|
- [X] Git init and first commit
|
||||||
|
- [X] Git remote add origin
|
||||||
|
- [X] Development log (docs/20251021T113500--*.org)
|
||||||
|
- [X] Opus 4.1 feedback integration
|
||||||
|
|
||||||
|
** TODO Phase 1: Core Documentation [0/4]
|
||||||
|
SCHEDULED: <2025-10-21 Tue>
|
||||||
|
|
||||||
|
*** TODO SKILL.md - Main guide for Claude
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 2h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Based on Opus 4.1 feedback, include:
|
||||||
|
- When to use this skill (트리거 명확히)
|
||||||
|
- Denote PKM systems
|
||||||
|
- 3,000+ org files
|
||||||
|
- Knowledge graph navigation
|
||||||
|
- Literate programming
|
||||||
|
|
||||||
|
- What this skill does
|
||||||
|
- Parse Denote filenames
|
||||||
|
- Resolve [[denote:ID]] links
|
||||||
|
- Build knowledge graph
|
||||||
|
- Execute code blocks
|
||||||
|
- Silo management
|
||||||
|
|
||||||
|
- How to use effectively
|
||||||
|
- Quick start examples
|
||||||
|
- Python script usage
|
||||||
|
- Common workflows
|
||||||
|
|
||||||
|
- Common pitfalls
|
||||||
|
- Edge cases (ID collision, circular refs, encoding...)
|
||||||
|
- Performance considerations
|
||||||
|
- Silo boundaries
|
||||||
|
|
||||||
|
Reference: PDF/XLSX SKILL.md structure
|
||||||
|
|
||||||
|
*** TODO denote-core.md - Denote specification
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 1.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Content:
|
||||||
|
- File naming: YYYYMMDDTHHMMSS--title__tags.org
|
||||||
|
- Frontmatter: #+title, #+date, #+filetags, #+identifier
|
||||||
|
- Links: [[denote:TIMESTAMP]]
|
||||||
|
- Silo concept
|
||||||
|
- Real examples from 3,000+ files
|
||||||
|
|
||||||
|
*** TODO denote-silo.md - Silo management guide
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 1h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Content:
|
||||||
|
- What is silo? (~/org/ vs ~/claude-memory/ vs ~/repos/*/docs/)
|
||||||
|
- Cross-silo links
|
||||||
|
- Priority resolution
|
||||||
|
- Path handling (os.path.expanduser)
|
||||||
|
|
||||||
|
*** TODO orgmode-base.md - Org-mode foundation
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 1.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Content:
|
||||||
|
- Headings, properties, timestamps
|
||||||
|
- Code blocks (#+begin_src ... #+end_src)
|
||||||
|
- Tables
|
||||||
|
- Links (file:, id:, denote:)
|
||||||
|
- Export basics
|
||||||
|
|
||||||
|
** TODO Phase 2: Denote Core Scripts [0/5]
|
||||||
|
SCHEDULED: <2025-10-22 Wed>
|
||||||
|
|
||||||
|
*** TODO scripts/denote_parser.py - File name and frontmatter parsing
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 2h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Functions:
|
||||||
|
#+begin_src python
|
||||||
|
def parse_denote_filename(filename: str) -> dict:
|
||||||
|
"""
|
||||||
|
Parse: 20251021T105353--title__tag1_tag2.org
|
||||||
|
Returns: {
|
||||||
|
'timestamp': '20251021T105353',
|
||||||
|
'title': 'title',
|
||||||
|
'tags': ['tag1', 'tag2'],
|
||||||
|
'extension': 'org'
|
||||||
|
}
|
||||||
|
|
||||||
|
Edge cases:
|
||||||
|
- 한글 title handling
|
||||||
|
- No tags (filename without __)
|
||||||
|
- Multiple hyphens in title
|
||||||
|
"""
|
||||||
|
|
||||||
|
def parse_denote_frontmatter(content: str) -> dict:
|
||||||
|
"""
|
||||||
|
Parse org-mode frontmatter:
|
||||||
|
#+title:, #+date:, #+filetags:, #+identifier:
|
||||||
|
"""
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Implementation notes:
|
||||||
|
- Use os.path.expanduser() for paths
|
||||||
|
- Handle encoding (UTF-8)
|
||||||
|
- Validate timestamp format
|
||||||
|
- Test with 100+ real filenames
|
||||||
|
|
||||||
|
*** TODO scripts/denote_finder.py - File search with caching
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 2.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Functions:
|
||||||
|
#+begin_src python
|
||||||
|
from functools import lru_cache
|
||||||
|
|
||||||
|
@lru_cache(maxsize=128)
|
||||||
|
def build_file_index(silo_path: str) -> dict:
|
||||||
|
"""Build index of all Denote files (cached)"""
|
||||||
|
|
||||||
|
def find_denote_file(identifier: str, silos: list) -> str:
|
||||||
|
"""Find file by timestamp ID"""
|
||||||
|
|
||||||
|
def find_by_tags(tags: list, silo: str) -> list:
|
||||||
|
"""Find files by tags"""
|
||||||
|
|
||||||
|
def find_by_date_range(pattern: str, silo: str) -> list:
|
||||||
|
"""Find files by date pattern (202510*)"""
|
||||||
|
|
||||||
|
def find_files_generator(pattern: str, silo: str):
|
||||||
|
"""Memory-efficient streaming search"""
|
||||||
|
for file in matching_files:
|
||||||
|
yield file
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Implementation notes:
|
||||||
|
- Generator for large result sets
|
||||||
|
- lru_cache for index
|
||||||
|
- Support multiple silos
|
||||||
|
- Pattern matching (glob, regex)
|
||||||
|
|
||||||
|
*** TODO scripts/denote_links.py - Link resolution with fallback
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 2h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Functions:
|
||||||
|
#+begin_src python
|
||||||
|
def resolve_denote_link(link_id: str, silos: list) -> str:
|
||||||
|
"""
|
||||||
|
Resolve [[denote:20251021T105353]] to file path
|
||||||
|
|
||||||
|
Try:
|
||||||
|
1. Exact match (full timestamp)
|
||||||
|
2. Fallback: partial match (first 8 chars)
|
||||||
|
3. Raise NotFoundError with suggestions
|
||||||
|
"""
|
||||||
|
|
||||||
|
def extract_denote_links(org_content: str) -> list:
|
||||||
|
"""Extract all [[denote:ID]] links from org file"""
|
||||||
|
|
||||||
|
def validate_links(filepath: str, silos: list) -> dict:
|
||||||
|
"""Check for broken links, return status"""
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Implementation notes:
|
||||||
|
- Error recovery (Opus feedback)
|
||||||
|
- Cross-silo links
|
||||||
|
- Backlinks tracking
|
||||||
|
|
||||||
|
*** TODO scripts/denote_silo.py - Silo management
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 1.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Functions:
|
||||||
|
#+begin_src python
|
||||||
|
def find_in_silos(identifier: str, silos: list, priority: bool = True) -> str:
|
||||||
|
"""
|
||||||
|
Search in multiple silos
|
||||||
|
priority=True: return first match
|
||||||
|
priority=False: return all matches
|
||||||
|
"""
|
||||||
|
|
||||||
|
def list_silos(base_paths: list) -> list:
|
||||||
|
"""Discover all Denote silos"""
|
||||||
|
|
||||||
|
def get_silo_stats(silo_path: str) -> dict:
|
||||||
|
"""Get statistics: file count, tags, date range"""
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Implementation notes:
|
||||||
|
- os.path.expanduser()
|
||||||
|
- Symlink resolution
|
||||||
|
- Priority handling
|
||||||
|
|
||||||
|
*** TODO scripts/requirements.txt - Python dependencies
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 0.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src text
|
||||||
|
orgparse>=0.3.0
|
||||||
|
pypandoc>=1.11
|
||||||
|
pyyaml>=6.0
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** TODO Phase 3: Knowledge Graph [0/2]
|
||||||
|
SCHEDULED: <2025-10-23 Thu>
|
||||||
|
|
||||||
|
*** TODO scripts/denote_graph.py - Graph builder with caching
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 3h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Functions:
|
||||||
|
#+begin_src python
|
||||||
|
from functools import lru_cache
|
||||||
|
import networkx as nx
|
||||||
|
|
||||||
|
@lru_cache(maxsize=32)
|
||||||
|
def build_knowledge_graph(silo_path: str) -> nx.DiGraph:
|
||||||
|
"""
|
||||||
|
Build directed graph:
|
||||||
|
- Nodes: Denote files
|
||||||
|
- Edges: [[denote:ID]] links
|
||||||
|
- Attributes: tags, title, date
|
||||||
|
|
||||||
|
Cached for performance
|
||||||
|
"""
|
||||||
|
|
||||||
|
def get_connected_nodes(identifier: str, hops: int = 2) -> list:
|
||||||
|
"""Get connected files (N-hop neighbors)"""
|
||||||
|
|
||||||
|
def detect_circular_refs(graph: nx.DiGraph) -> list:
|
||||||
|
"""Detect circular references (Edge case!)"""
|
||||||
|
|
||||||
|
def update_graph_incremental(graph: nx.DiGraph, changed_files: list):
|
||||||
|
"""Incremental update (Opus suggestion)"""
|
||||||
|
|
||||||
|
def export_graph_stats(graph: nx.DiGraph) -> dict:
|
||||||
|
"""Export graph statistics (nodes, edges, clusters...)"""
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Implementation notes:
|
||||||
|
- Use networkx for graph operations
|
||||||
|
- Detect cycles (circular references)
|
||||||
|
- Incremental updates
|
||||||
|
- Performance monitoring (>1s warning)
|
||||||
|
|
||||||
|
*** TODO denote-knowledge-graph.md - Graph documentation
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 1.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Content:
|
||||||
|
- Graph structure (nodes, edges)
|
||||||
|
- Algorithms (BFS, DFS for traversal)
|
||||||
|
- Circular reference handling
|
||||||
|
- Performance benchmarks (3,000+ files)
|
||||||
|
- Use cases (find related, clusters, orphans)
|
||||||
|
|
||||||
|
** TODO Phase 4: Org-mode Features [0/3]
|
||||||
|
SCHEDULED: <2025-10-24 Fri>
|
||||||
|
|
||||||
|
*** TODO scripts/org_parser.py - Org structure parsing
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 2h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Functions:
|
||||||
|
#+begin_src python
|
||||||
|
import orgparse
|
||||||
|
|
||||||
|
def parse_org_file(filepath: str) -> orgparse.OrgNode:
|
||||||
|
"""Parse org file structure"""
|
||||||
|
|
||||||
|
def extract_headings(node: orgparse.OrgNode, level: int = None) -> list:
|
||||||
|
"""Extract headings (optionally by level)"""
|
||||||
|
|
||||||
|
def extract_properties(node: orgparse.OrgNode) -> dict:
|
||||||
|
"""Extract properties drawer"""
|
||||||
|
|
||||||
|
def extract_timestamps(node: orgparse.OrgNode) -> list:
|
||||||
|
"""Extract all timestamps"""
|
||||||
|
|
||||||
|
def extract_code_blocks(filepath: str) -> list:
|
||||||
|
"""Extract #+begin_src blocks with metadata"""
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** TODO scripts/org_execute.py - Code block execution (Emacs compatible)
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 2.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Functions:
|
||||||
|
#+begin_src python
|
||||||
|
def execute_org_blocks(filepath: str, block_names: list = None):
|
||||||
|
"""
|
||||||
|
Execute code blocks (org-babel compatible)
|
||||||
|
|
||||||
|
Support:
|
||||||
|
- :tangle option (file path)
|
||||||
|
- :results option (silent/output/value)
|
||||||
|
- Named blocks (#+name:)
|
||||||
|
- Languages (bash, python, ...)
|
||||||
|
|
||||||
|
Safety:
|
||||||
|
- Preserve org structure
|
||||||
|
- Update #+RESULTS blocks
|
||||||
|
- Error handling
|
||||||
|
"""
|
||||||
|
|
||||||
|
def tangle_org_file(filepath: str, output_dir: str = None):
|
||||||
|
"""Extract code blocks to files (:tangle)"""
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Implementation notes:
|
||||||
|
- Org-babel :results handling (Opus feedback)
|
||||||
|
- Structure preservation (critical!)
|
||||||
|
- Timeout handling
|
||||||
|
|
||||||
|
*** TODO scripts/org_export.py - Multi-format export
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 1.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Functions:
|
||||||
|
#+begin_src python
|
||||||
|
import pypandoc
|
||||||
|
|
||||||
|
def export_to_markdown(org_file: str, output: str):
|
||||||
|
"""org → markdown (preserve Denote frontmatter)"""
|
||||||
|
|
||||||
|
def export_to_html(org_file: str, output: str):
|
||||||
|
"""org → HTML"""
|
||||||
|
|
||||||
|
def export_to_pdf(org_file: str, output: str):
|
||||||
|
"""org → PDF (requires LaTeX)"""
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** TODO Phase 5: Testing & Examples [0/4]
|
||||||
|
SCHEDULED: <2025-10-25 Sat>
|
||||||
|
|
||||||
|
*** TODO tests/ - Test dataset structure
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 2h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Create test files:
|
||||||
|
#+begin_example
|
||||||
|
tests/
|
||||||
|
├── small/ # 10 files (fast tests)
|
||||||
|
│ ├── 20251021T100000--test-file-1__test.org
|
||||||
|
│ ├── 20251021T100100--test-file-2__test_denote.org
|
||||||
|
│ └── ...
|
||||||
|
├── medium/ # 100 files (feature tests)
|
||||||
|
└── large/ # 1000+ files (performance tests)
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
Include edge cases:
|
||||||
|
- ID collision (same second)
|
||||||
|
- Circular references
|
||||||
|
- Cross-silo links
|
||||||
|
- 한글 titles
|
||||||
|
- Broken links
|
||||||
|
|
||||||
|
*** TODO examples/ - Usage examples
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 1.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Create:
|
||||||
|
- examples/basic.org (basic Denote file)
|
||||||
|
- examples/literate.org (code blocks with :tangle)
|
||||||
|
- examples/knowledge-graph.org (multiple links)
|
||||||
|
|
||||||
|
*** TODO Run tests with 3,000+ real files
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 1h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Test with actual ~/org/ directory:
|
||||||
|
- File finding speed
|
||||||
|
- Graph building time
|
||||||
|
- Link resolution accuracy
|
||||||
|
- Memory usage
|
||||||
|
|
||||||
|
*** TODO Performance benchmarks
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 1h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Measure:
|
||||||
|
- denote_finder.py: <100ms for single file
|
||||||
|
- denote_graph.py: <10s for 3,000 files (cached: <1s)
|
||||||
|
- denote_links.py: <50ms per link
|
||||||
|
|
||||||
|
** TODO Phase 6: 0.1 Release [0/5]
|
||||||
|
SCHEDULED: <2025-10-26 Sun>
|
||||||
|
|
||||||
|
*** TODO Complete SKILL.md with all sections
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 1h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Final review:
|
||||||
|
- All "When/What/How/Pitfalls" sections
|
||||||
|
- Working code examples
|
||||||
|
- Cross-references to other docs
|
||||||
|
|
||||||
|
*** TODO Update README with installation instructions
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 0.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Add:
|
||||||
|
- Tested installation steps
|
||||||
|
- Dependencies verification
|
||||||
|
- Quick start that actually works
|
||||||
|
|
||||||
|
*** TODO Create CHANGELOG.md
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 0.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Document:
|
||||||
|
- v0.1 initial release
|
||||||
|
- Features implemented
|
||||||
|
- Known limitations
|
||||||
|
|
||||||
|
*** TODO Final Git commit and tag
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 0.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
git add .
|
||||||
|
git commit -m "Release 0.1: Core Denote-Org Skills"
|
||||||
|
git tag -a v0.1 -m "Version 0.1: Denote core + org-mode base"
|
||||||
|
git push -u origin main
|
||||||
|
git push origin v0.1
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** TODO Convert repository to Public
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 0.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
GitHub settings:
|
||||||
|
- Repository → Settings → General
|
||||||
|
- Danger Zone → Change visibility → Public
|
||||||
|
- Confirm
|
||||||
|
|
||||||
|
** TODO Phase 7: Community Outreach [0/4]
|
||||||
|
|
||||||
|
*** TODO Submit PR to awesome-claude-skills
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 1h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Repository: https://github.com/travisvn/awesome-claude-skills
|
||||||
|
|
||||||
|
Add to Community Skills section:
|
||||||
|
#+begin_src markdown
|
||||||
|
### Knowledge Management
|
||||||
|
|
||||||
|
- **[denote-org](https://github.com/junghan0611/org-mode-skills)** -
|
||||||
|
Comprehensive Denote PKM system support with org-mode foundation.
|
||||||
|
Validated with 3,000+ files. Features knowledge graph navigation,
|
||||||
|
literate programming, and multi-silo management.
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** TODO Share on communities
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 1h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Platforms:
|
||||||
|
- [ ] Reddit r/emacs
|
||||||
|
- [ ] Reddit r/orgmode
|
||||||
|
- [ ] Hacker News
|
||||||
|
- [ ] Anthropic Discord/Forum
|
||||||
|
- [ ] Protesilaos Stavrou (Denote creator) - mention on Mastodon?
|
||||||
|
|
||||||
|
*** TODO Create announcement blog post
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 2h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Write for notes.junghanacs.com:
|
||||||
|
- Title: "Denote-Org Skills: Life Sciences Paradigm for Life Everything"
|
||||||
|
- Content: Project vision, technical details, 9-layer context
|
||||||
|
- Publish as org → markdown
|
||||||
|
|
||||||
|
*** TODO AIONS Clubs announcement
|
||||||
|
:PROPERTIES:
|
||||||
|
:EFFORT: 0.5h
|
||||||
|
:END:
|
||||||
|
|
||||||
|
Share with AIONS community:
|
||||||
|
- Project overview
|
||||||
|
- Life Sciences → Life Everything vision
|
||||||
|
- Contribution opportunity
|
||||||
|
|
||||||
|
* Implementation Notes
|
||||||
|
|
||||||
|
** Critical Requirements (from Opus 4.1)
|
||||||
|
|
||||||
|
*** File Path Handling
|
||||||
|
#+begin_src python
|
||||||
|
import os
|
||||||
|
# Always use
|
||||||
|
silo = os.path.expanduser("~/org/")
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** Caching Strategy
|
||||||
|
#+begin_src python
|
||||||
|
from functools import lru_cache
|
||||||
|
|
||||||
|
@lru_cache(maxsize=128)
|
||||||
|
def expensive_operation():
|
||||||
|
pass
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** Error Recovery
|
||||||
|
#+begin_src python
|
||||||
|
def resolve_with_fallback(identifier):
|
||||||
|
try:
|
||||||
|
return exact_match(identifier)
|
||||||
|
except NotFoundError:
|
||||||
|
return partial_match(identifier[:8])
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** Performance Monitoring
|
||||||
|
#+begin_src python
|
||||||
|
def measure_performance(func):
|
||||||
|
# Log if > 1 second
|
||||||
|
pass
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Edge Cases to Handle
|
||||||
|
|
||||||
|
1. [ ] Denote ID collision (same second)
|
||||||
|
2. [ ] Circular references in graph
|
||||||
|
3. [ ] Cross-silo links
|
||||||
|
4. [ ] 한글 encoding in filenames
|
||||||
|
5. [ ] Symlink resolution
|
||||||
|
|
||||||
|
** Dependencies
|
||||||
|
|
||||||
|
*** Python packages
|
||||||
|
- orgparse>=0.3.0
|
||||||
|
- pypandoc>=1.11
|
||||||
|
- pyyaml>=6.0
|
||||||
|
- networkx>=3.0 (for knowledge graph)
|
||||||
|
|
||||||
|
*** System
|
||||||
|
- Pandoc (for export)
|
||||||
|
- Python 3.8+
|
||||||
|
|
||||||
|
* Progress Tracking
|
||||||
|
|
||||||
|
** Week 1 (2025-10-21 ~ 2025-10-27)
|
||||||
|
- [X] Day 1 (Mon): Project setup, README, Git init
|
||||||
|
- [ ] Day 2 (Tue): SKILL.md, denote-core.md
|
||||||
|
- [ ] Day 3 (Wed): Core scripts (parser, finder)
|
||||||
|
- [ ] Day 4 (Thu): Links, silo, graph
|
||||||
|
- [ ] Day 5 (Fri): Org-mode features
|
||||||
|
- [ ] Day 6 (Sat): Testing
|
||||||
|
- [ ] Day 7 (Sun): 0.1 Release
|
||||||
|
|
||||||
|
** Metrics
|
||||||
|
|
||||||
|
*** Current Status (2025-10-21)
|
||||||
|
- Files: 5 (README×2, LICENSE, .gitignore, docs)
|
||||||
|
- Commits: 2
|
||||||
|
- Lines: 1,677 (docs: 829, README: 743, LICENSE: 202)
|
||||||
|
- Status: 🟡 Development
|
||||||
|
|
||||||
|
*** Target for 0.1
|
||||||
|
- Files: 15+ (docs, scripts, examples)
|
||||||
|
- Scripts: 7 Python files
|
||||||
|
- Tests: 3 levels (small/medium/large)
|
||||||
|
- Documentation: Complete
|
||||||
|
- Status: 🟢 Public Release
|
||||||
|
|
||||||
|
* References
|
||||||
|
|
||||||
|
** Anthropic Resources
|
||||||
|
- [[https://github.com/anthropics/skills][Official Skills Repository]]
|
||||||
|
- [[https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills][Agent Skills Engineering Blog]]
|
||||||
|
- document-skills/pdf/SKILL.md (8 scripts example)
|
||||||
|
- document-skills/xlsx/SKILL.md (CRITICAL rules example)
|
||||||
|
|
||||||
|
** Denote Resources
|
||||||
|
- [[https://protesilaos.com/emacs/denote][Denote by Protesilaos Stavrou]]
|
||||||
|
- [[https://orgmode.org/][Org-mode]]
|
||||||
|
|
||||||
|
** Related Projects
|
||||||
|
- [[file:~/repos/gh/claude-config/README.md][claude-config]]
|
||||||
|
- [[file:~/repos/gh/memex-kb/README.md][memex-kb]]
|
||||||
|
- [[file:~/repos/gh/embedding-config/README.md][embedding-config]]
|
||||||
|
|
||||||
|
* Notes
|
||||||
|
|
||||||
|
** Opus 4.1 Feedback Summary
|
||||||
|
"Life Sciences → Life Everything 패러다임 확장은
|
||||||
|
Anthropic Skills의 본질을 잘 이해한 접근입니다."
|
||||||
|
|
||||||
|
Key insights:
|
||||||
|
- SKILL.md structure is critical
|
||||||
|
- Performance optimization for 3,000+ files
|
||||||
|
- Edge case handling is essential
|
||||||
|
- Test dataset structure needed
|
||||||
|
|
||||||
|
** Project Philosophy
|
||||||
|
Skills = Onboarding guide for domain expertise
|
||||||
|
NOT a converter, AN operational system
|
||||||
|
Validated with real-world 3,000+ files PKM
|
||||||
|
|
||||||
|
---
|
||||||
|
Last updated: [2025-10-21 Tue 11:58]
|
||||||
@@ -0,0 +1,828 @@
|
|||||||
|
#+title: Denote-Org Skills 프로젝트 시작: 배경 및 작업 로그
|
||||||
|
#+date: [2025-10-21 Tue 11:35]
|
||||||
|
#+filetags: :project:skills:denote:anthropic:worklog:
|
||||||
|
#+identifier: 20251021T113500
|
||||||
|
#+export_file_name: 20251021T113500.md
|
||||||
|
|
||||||
|
* Denote-Org Skills 프로젝트 시작 :WORKLOG:
|
||||||
|
|
||||||
|
** 히스토리
|
||||||
|
- [2025-10-21 Tue 11:35] 프로젝트 시작, README 작성
|
||||||
|
- [2025-10-21 Tue 07:45] Anthropic Life Sciences 영상 분석
|
||||||
|
- [2025-10-21 Tue 07:00] Life Sciences → Tools for Life 통찰
|
||||||
|
|
||||||
|
** 관련 메타
|
||||||
|
- [[denote:20251021T074500][Anthropic Life Sciences와 Tools for Life 패러다임]]
|
||||||
|
- [[denote:20251021T105353][프로젝트 Denote 문서 Org-mode 전환]]
|
||||||
|
- [[denote:20251015T093311][@힣: 시간과정신의방 -CONFIG 생태계]]
|
||||||
|
|
||||||
|
* 프로젝트 배경: Anthropic Life Sciences에서 시작
|
||||||
|
|
||||||
|
** 발단: Life Sciences 영상 분석
|
||||||
|
|
||||||
|
오늘 아침 Anthropic의 Life Sciences 영상을 분석하던 중 중요한 발견:
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
"Anthropic이 생명과학에서 증명한 것:
|
||||||
|
**도메인 컨텍스트 + AI = 전문가 수준 협업**
|
||||||
|
|
||||||
|
PubMed + Claude = Scientific AI"
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
이것을 9개 레이어 시스템과 연결하면서 깨달음:
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
"내 시스템은 Life Sciences의 개인 버전이 아니라,
|
||||||
|
**Life Sciences 패러다임을 삶 전반으로 확장하는 청사진**이다."
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
** 전환점: "Skills"의 본질 이해
|
||||||
|
|
||||||
|
Anthropic Skills 리포지토리 2개 클론:
|
||||||
|
- =~/repos/3rd/snthropics-skills= (공식)
|
||||||
|
- =~/repos/3rd/awesome-claude-skills= (커뮤니티)
|
||||||
|
|
||||||
|
PDF, XLSX Skills 분석 중 핵심 발견:
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
**Skills ≠ 단순 프롬프트**
|
||||||
|
**Skills = Onboarding Guide + Procedural Knowledge + Executable Scripts**
|
||||||
|
|
||||||
|
"Skills는 범용 에이전트를 도메인 전문가로 변환시킨다"
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
** 중요한 질문: "단순 변환기 프롬프트가 될까 봐 염려"
|
||||||
|
|
||||||
|
사용자가 제기한 핵심 질문:
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
"Skills를 Anthropic이 만든 이유가 있고 필요한 케이스가 있을거야.
|
||||||
|
거기에 집중해서 Skill가 되어야해."
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
이것이 프로젝트의 방향을 완전히 바꿨습니다.
|
||||||
|
|
||||||
|
* Skills의 본질: Anthropic 공식 분석
|
||||||
|
|
||||||
|
** WebFetch 결과: Skills가 해결하는 4가지 문제
|
||||||
|
|
||||||
|
출처: [[https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills]]
|
||||||
|
|
||||||
|
*** 1. Context Management
|
||||||
|
#+begin_quote
|
||||||
|
"effectively unbounded" context via bundled files
|
||||||
|
|
||||||
|
프롬프트는 모든 정보를 한 번에 로드해야 함
|
||||||
|
Skills는 필요한 것만 progressive disclosure
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
*** 2. Reusability and Portability
|
||||||
|
#+begin_quote
|
||||||
|
"packaging your expertise into composable resources"
|
||||||
|
|
||||||
|
프롬프트는 매번 재작성
|
||||||
|
Skills는 팀 간 공유, 반복 사용
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
*** 3. Code Execution Efficiency
|
||||||
|
#+begin_quote
|
||||||
|
"deterministic reliability" with bundled scripts
|
||||||
|
|
||||||
|
프롬프트는 Claude가 코드 생성 (토큰 소모, 오류 가능)
|
||||||
|
Skills는 검증된 스크립트 실행
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
*** 4. Organizational Knowledge Capture
|
||||||
|
#+begin_quote
|
||||||
|
"putting together an onboarding guide for a new hire"
|
||||||
|
|
||||||
|
프롬프트는 일회성
|
||||||
|
Skills는 절차적 지식 영구 보존
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
** Document Skills 분석: PDF, XLSX, DOCX
|
||||||
|
|
||||||
|
*** PDF Skills의 복잡성
|
||||||
|
|
||||||
|
*Forms 채우기 절차:*
|
||||||
|
1. =check_fillable_fields.py= - 채울 수 있는 필드 확인
|
||||||
|
2. =extract_form_field_info.py= - 필드 정보 JSON 추출
|
||||||
|
3. =convert_pdf_to_images.py= - PDF → PNG 변환
|
||||||
|
4. Bounding box 분석 (이미지 좌표)
|
||||||
|
5. =create_validation_image.py= - 검증 이미지 생성
|
||||||
|
6. =fill_fillable_fields.py= - 실제 채우기
|
||||||
|
|
||||||
|
**총 8개 Python 스크립트!**
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
이것이 Skill인 이유:
|
||||||
|
Claude 혼자 매번 이 절차를 수행? → 토큰 폭발 + 오류 많음
|
||||||
|
Skill로 번들? → 안정적, 재사용 가능
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
*** XLSX Skills의 CRITICAL 규칙
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
MUST:
|
||||||
|
- Zero Formula Errors (필수)
|
||||||
|
- NEVER hardcode values, ALWAYS use formulas
|
||||||
|
- Color coding (Blue=input, Black=formula, Green=internal link...)
|
||||||
|
- recalc.py로 LibreOffice 실행하여 공식 재계산
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
이것이 Skill인 이유:
|
||||||
|
Excel은 단순 데이터 파일이 아님
|
||||||
|
동적 계산 시스템, 업데이트 가능해야 함
|
||||||
|
Claude 혼자? → 공식 오류, 업데이트 불가
|
||||||
|
Skill? → 검증된 절차, LibreOffice 자동 실행
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
*** DOCX Skills의 Tracked Changes
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
Redlining workflow:
|
||||||
|
- OOXML 구조 이해
|
||||||
|
- Tracked changes 보존
|
||||||
|
- Comments 처리
|
||||||
|
- Pandoc 옵션 (--track-changes=all)
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
* Denote-Org Skills가 필요한 이유
|
||||||
|
|
||||||
|
** 문제 분석: 3,000+ 파일 Denote PKM
|
||||||
|
|
||||||
|
*** 문제 1: Denote 파일명 = 특수 도메인 지식
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
20251021T105353--프로젝트-제목__llmlog_denote_orgmode.org
|
||||||
|
│ │ │
|
||||||
|
│ │ └─ 태그 (underscore separated)
|
||||||
|
│ └─ 한글 제목 (hyphen separated)
|
||||||
|
└─ Timestamp (Denote ID, 유일 식별자)
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
**Without Skill:**
|
||||||
|
- Claude: "이게 무슨 형식이지?" 매번 추측
|
||||||
|
- 파일명 파싱 로직 매번 Python/Bash로 생성
|
||||||
|
- 한글 제목 처리 헷갈림
|
||||||
|
- → **토큰 낭비, 오류 발생**
|
||||||
|
|
||||||
|
**With Skill:**
|
||||||
|
#+begin_src python
|
||||||
|
# scripts/denote_parser.py (한 번만 작성)
|
||||||
|
def parse_denote_filename(filename):
|
||||||
|
"""
|
||||||
|
20251021T105353--프로젝트-제목__llmlog_denote.org
|
||||||
|
→
|
||||||
|
{
|
||||||
|
'timestamp': '20251021T105353',
|
||||||
|
'title': '프로젝트 제목',
|
||||||
|
'tags': ['llmlog', 'denote'],
|
||||||
|
'extension': 'org'
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
→ **재사용 가능, 검증됨, 빠름**
|
||||||
|
|
||||||
|
*** 문제 2: 3,000 파일 검색 = 복잡한 절차
|
||||||
|
|
||||||
|
**Without Skill:**
|
||||||
|
#+begin_src bash
|
||||||
|
# Claude가 매번 실행:
|
||||||
|
find ~/org -name "*20251021T105353*"
|
||||||
|
# 하위 디렉토리: bib/ meta/ notes/ journal/ llmlog/ office/ configs/ ...
|
||||||
|
# 3,000 파일 스캔 → 느림
|
||||||
|
# 매번 토큰 소모
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
**With Skill:**
|
||||||
|
#+begin_src python
|
||||||
|
# scripts/denote_finder.py (캐싱 가능)
|
||||||
|
def find_denote_file(identifier, silos):
|
||||||
|
"""
|
||||||
|
인덱스 구축 (한 번)
|
||||||
|
이후 검색 즉시 반환
|
||||||
|
"""
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
→ **효율적, 캐싱, 확장 가능**
|
||||||
|
|
||||||
|
*** 문제 3: 지식 그래프 = 복잡도 폭발
|
||||||
|
|
||||||
|
**시나리오:**
|
||||||
|
#+begin_example
|
||||||
|
User: "20251021T105353와 연결된 모든 파일 보여줘"
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
**Without Skill:**
|
||||||
|
1. 파일 읽기
|
||||||
|
2. `[[denote:20251021T074500]]` links 찾기
|
||||||
|
3. 각 ID마다 find 실행 (문제 2 반복)
|
||||||
|
4. 2-hop 연결? 3-hop?
|
||||||
|
5. → **토큰 폭발, 느림**
|
||||||
|
|
||||||
|
**With Skill:**
|
||||||
|
#+begin_src python
|
||||||
|
# scripts/denote_graph.py
|
||||||
|
def build_knowledge_graph(silo):
|
||||||
|
"""
|
||||||
|
한 번 구축, 캐싱
|
||||||
|
graph = {
|
||||||
|
'20251021T105353': {
|
||||||
|
'links_to': ['20251021T074500', ...],
|
||||||
|
'linked_from': ['20251020T...', ...],
|
||||||
|
'tags': ['llmlog', 'denote'],
|
||||||
|
'title': '...'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
|
def get_connected_nodes(identifier, hops=2):
|
||||||
|
"""즉시 반환"""
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
→ **그래프 알고리즘, 캐싱, 빠름**
|
||||||
|
|
||||||
|
*** 문제 4: Literate Programming = Emacs 동작 재현
|
||||||
|
|
||||||
|
**시나리오:**
|
||||||
|
#+begin_example
|
||||||
|
User: "org 파일 코드 블록 실행해줘"
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
Org-mode 코드 블록:
|
||||||
|
#+begin_src org
|
||||||
|
,#+name: example-block
|
||||||
|
,#+begin_src bash :tangle /tmp/script.sh :results output
|
||||||
|
echo "Hello from org-babel"
|
||||||
|
,#+end_src
|
||||||
|
|
||||||
|
,#+RESULTS:
|
||||||
|
: Hello from org-babel
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
**Without Skill:**
|
||||||
|
- Claude가 수동으로 `#+begin_src` 찾기
|
||||||
|
- `:tangle` 옵션 파싱 (파일 경로 추출)
|
||||||
|
- 코드 추출, 실행
|
||||||
|
- `:results` 부분 업데이트
|
||||||
|
- → **org 구조 깨질 위험, 복잡함**
|
||||||
|
|
||||||
|
**With Skill:**
|
||||||
|
#+begin_src python
|
||||||
|
# scripts/org_execute.py (Emacs org-babel 재현)
|
||||||
|
def execute_org_blocks(filepath):
|
||||||
|
"""
|
||||||
|
1. orgparse로 구조 파싱
|
||||||
|
2. code blocks 찾기
|
||||||
|
3. :tangle 옵션 처리
|
||||||
|
4. 안전하게 실행
|
||||||
|
5. :results 업데이트 (구조 보존)
|
||||||
|
"""
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
→ **안전, Emacs 호환, 재현 가능**
|
||||||
|
|
||||||
|
*** 문제 5: Silo 관리 = 여러 디렉토리
|
||||||
|
|
||||||
|
**시나리오:**
|
||||||
|
#+begin_example
|
||||||
|
User: "20251021T105353 파일 어디 있어?"
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
**Silos:**
|
||||||
|
- =~/org/= (3,000+ 파일)
|
||||||
|
- =~/claude-memory/= (AI 메모리)
|
||||||
|
- =~/repos/*/docs/= (프로젝트별)
|
||||||
|
|
||||||
|
**Without Skill:**
|
||||||
|
- Claude: "~/org/에 있나? 아니면..."
|
||||||
|
- 매번 여러 find 실행
|
||||||
|
- 헷갈림
|
||||||
|
|
||||||
|
**With Skill:**
|
||||||
|
#+begin_src python
|
||||||
|
# scripts/denote_silo.py
|
||||||
|
def find_in_silos(identifier, silos):
|
||||||
|
"""
|
||||||
|
여러 silo 동시 검색
|
||||||
|
우선순위 적용
|
||||||
|
캐싱
|
||||||
|
"""
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
→ **명확, 자동, 빠름**
|
||||||
|
|
||||||
|
* Skills vs 프롬프트: 결정적 차이
|
||||||
|
|
||||||
|
** Skills가 필요한 케이스 (Anthropic 패턴)
|
||||||
|
|
||||||
|
| Document Skill | 왜 Skills인가? | 핵심 스크립트 | 단순 프롬프트로? |
|
||||||
|
|----------------|---------------|-------------|----------------|
|
||||||
|
| **PDF** | Forms 채우기 복잡 | 8개 (check, fill, validate...) | ❌ 토큰 폭발 |
|
||||||
|
| **XLSX** | 공식 유지 필수 | recalc.py (LibreOffice) | ❌ 공식 오류 |
|
||||||
|
| **DOCX** | Tracked changes | OOXML 파싱 | ❌ 구조 손상 |
|
||||||
|
| **Denote-Org** | 3,000 파일 그래프 | finder, graph, silo | ❌ 느림, 오류 |
|
||||||
|
|
||||||
|
** 단순 프롬프트가 될 위험
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
❌ "Denote 파일명은 이런 형식이야. 파싱해줘."
|
||||||
|
→ Claude: 매번 코드 생성, 토큰 낭비
|
||||||
|
|
||||||
|
❌ "org 파일 코드 블록 실행해줘."
|
||||||
|
→ Claude: 매번 파싱 로직 작성, 구조 깨질 위험
|
||||||
|
|
||||||
|
❌ "3,000 파일에서 이 ID 찾아줘."
|
||||||
|
→ Claude: find 반복 실행, 느림
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
** Skills로 해결
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
✅ **Domain Knowledge 번들**
|
||||||
|
- Denote 파일명 규칙
|
||||||
|
- Frontmatter 스펙
|
||||||
|
- Links 문법
|
||||||
|
|
||||||
|
✅ **Executable Scripts**
|
||||||
|
- denote_parser.py (검증됨)
|
||||||
|
- denote_finder.py (캐싱)
|
||||||
|
- org_execute.py (안전)
|
||||||
|
|
||||||
|
✅ **Procedural Knowledge**
|
||||||
|
- "이런 경우 이렇게 한다"
|
||||||
|
- PDF Forms처럼 복잡한 절차
|
||||||
|
- 재사용 가능한 패턴
|
||||||
|
|
||||||
|
✅ **Performance**
|
||||||
|
- 스크립트 실행 (토큰 생성 아님)
|
||||||
|
- 캐싱
|
||||||
|
- 배치 처리
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
* 프로젝트 목표: Denote PKM을 Claude의 Domain으로
|
||||||
|
|
||||||
|
** 핵심 목표
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
**Denote + Org-mode를 Claude가 "네이티브"로 다루게 한다**
|
||||||
|
|
||||||
|
PDF/XLSX/DOCX처럼,
|
||||||
|
Denote-Org도 Claude의 전문 영역이 되게 한다.
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
** 구체적 목표
|
||||||
|
|
||||||
|
*** 1. Denote Domain Expertise
|
||||||
|
- 파일명 규칙 완벽 이해
|
||||||
|
- Frontmatter 자동 파싱
|
||||||
|
- Links 즉시 해결
|
||||||
|
- Silo 자동 관리
|
||||||
|
|
||||||
|
*** 2. 3,000+ Files Scale
|
||||||
|
- 효율적 검색 (캐싱)
|
||||||
|
- 지식 그래프 구축
|
||||||
|
- 배치 처리
|
||||||
|
|
||||||
|
*** 3. Literate Programming
|
||||||
|
- Emacs org-babel 호환
|
||||||
|
- 안전한 코드 실행
|
||||||
|
- 구조 보존
|
||||||
|
|
||||||
|
*** 4. Org-mode Foundation
|
||||||
|
- Heading, property, timestamp
|
||||||
|
- Table 연산
|
||||||
|
- Export (markdown, PDF, HTML)
|
||||||
|
|
||||||
|
** 차별화 요소
|
||||||
|
|
||||||
|
| 기존 접근 | 이 프로젝트 |
|
||||||
|
|----------|-----------|
|
||||||
|
| Org-mode 일반 지원 | **Denote 특화** |
|
||||||
|
| 단순 파싱 | **운영 시스템** |
|
||||||
|
| 토큰 기반 | **스크립트 기반** |
|
||||||
|
| 장난감 예제 | **3,000+ 파일 검증** |
|
||||||
|
|
||||||
|
* 9개 레이어 시스템과의 연결
|
||||||
|
|
||||||
|
** Layer 3: Knowledge Management
|
||||||
|
|
||||||
|
이 프로젝트는 Layer 3의 핵심 구성 요소:
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
Layer 3: Knowledge Management
|
||||||
|
├── Zotero (156k+ lines 서지 데이터)
|
||||||
|
└── Denote-Org Skills (3,000+ org 파일) 🆕
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
** 다른 레이어와의 상호작용
|
||||||
|
|
||||||
|
*** Layer 4 (claude-config)와 통합
|
||||||
|
- =~/claude-memory/= silo 관리
|
||||||
|
- PARA 방법론 (Projects/Areas/Resources/Archives)
|
||||||
|
- Denote 형식으로 AI 메모리 저장
|
||||||
|
|
||||||
|
*** Layer 3.5 (embedding-config)와 통합
|
||||||
|
- Org 파일 벡터화
|
||||||
|
- org-db-v3 RAG 파이프라인
|
||||||
|
- 의미론적 검색
|
||||||
|
|
||||||
|
*** Layer 5a (memex-kb)와 통합
|
||||||
|
- Markdown → Org 변환
|
||||||
|
- Denote 파일명 생성
|
||||||
|
- 마이그레이션 대상
|
||||||
|
|
||||||
|
*** Layer 7 (notes)과 통합
|
||||||
|
- Org → Markdown export
|
||||||
|
- 디지털 가든 퍼블리싱
|
||||||
|
- Quartz 4 연동
|
||||||
|
|
||||||
|
* 작업 로그
|
||||||
|
|
||||||
|
** [2025-10-21 Tue 07:00~08:00] Anthropic Life Sciences 분석
|
||||||
|
|
||||||
|
*** 작업 내용
|
||||||
|
1. Life Sciences 영상 내용 분석
|
||||||
|
2. 9개 레이어 시스템 문서 확인
|
||||||
|
3. embedding-config 발견 (Layer 3.5)
|
||||||
|
4. 연관성 분석
|
||||||
|
|
||||||
|
*** 핵심 통찰
|
||||||
|
- embedding-config = Life Sciences의 PubMed 패턴
|
||||||
|
- 9개 레이어 = Personal Life Sciences
|
||||||
|
|
||||||
|
*** 결과물
|
||||||
|
- =~/org/llmlog/20251021T074500--anthropic-life-sciences와-tools-for-life-패러다임-aions-클럽-비전__*.org=
|
||||||
|
|
||||||
|
** [2025-10-21 Tue 10:00~11:00] Org-mode 전환 프로젝트
|
||||||
|
|
||||||
|
*** 작업 내용
|
||||||
|
1. Markdown → Org-mode 전환 진행 중
|
||||||
|
2. Literate programming 필요성 인식
|
||||||
|
3. =~/org/llmlog/20251021T105353--프로젝트-denote-문서-org-mode-전환__*.org= 생성
|
||||||
|
|
||||||
|
** [2025-10-21 Tue 11:00~11:30] Skills 본질 파악
|
||||||
|
|
||||||
|
*** 작업 내용
|
||||||
|
1. Anthropic Skills 리포 2개 클론
|
||||||
|
- =~/repos/3rd/snthropics-skills=
|
||||||
|
- =~/repos/3rd/awesome-claude-skills=
|
||||||
|
|
||||||
|
2. Document Skills 분석
|
||||||
|
- PDF: 8개 스크립트
|
||||||
|
- XLSX: CRITICAL 규칙들
|
||||||
|
- DOCX: Tracked changes
|
||||||
|
|
||||||
|
3. WebFetch: Anthropic 공식 블로그 분석
|
||||||
|
|
||||||
|
*** 핵심 질문 (사용자)
|
||||||
|
#+begin_quote
|
||||||
|
"Skills를 Anthropic이 만든 이유가 있고 필요한 케이스가 있을거야.
|
||||||
|
거기에 집중해서 Skill가 되어야해."
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
→ 프로젝트 방향 전환!
|
||||||
|
|
||||||
|
** [2025-10-21 Tue 11:30~현재] Denote-Org Skills 시작
|
||||||
|
|
||||||
|
*** 작업 내용
|
||||||
|
1. ✅ =~/repos/gh/orgmode-skills= 폴더 생성
|
||||||
|
2. ✅ Git 초기화 준비
|
||||||
|
3. ✅ README.md 작성 (영어)
|
||||||
|
4. ✅ README-KO.md 작성 (한글)
|
||||||
|
5. ✅ 이 문서 작성 (작업 로그)
|
||||||
|
|
||||||
|
*** 핵심 결정
|
||||||
|
|
||||||
|
**** 이름: `orgmode-skills` (폴더) + `denote-org` (skill name)
|
||||||
|
- 폴더명: 직관적 (orgmode-skills)
|
||||||
|
- Skill 이름: 우선순위 (denote-org, Denote가 핵심)
|
||||||
|
|
||||||
|
**** 구조: PDF/XLSX 패턴 따름
|
||||||
|
- SKILL.md (메인)
|
||||||
|
- denote-core.md, denote-silo.md (상세)
|
||||||
|
- scripts/ (Python)
|
||||||
|
- docs/ (Denote 형식 작업 로그)
|
||||||
|
|
||||||
|
**** 메시지: "Skills ≠ Prompt"
|
||||||
|
- Onboarding guide
|
||||||
|
- Procedural knowledge
|
||||||
|
- Executable scripts
|
||||||
|
- **NOT a converter, AN operational system**
|
||||||
|
|
||||||
|
* 0.1 버전 체크리스트
|
||||||
|
|
||||||
|
** Phase 1: 기반 (현재)
|
||||||
|
- [X] 프로젝트 폴더 생성 (~/repos/gh/orgmode-skills)
|
||||||
|
- [X] README.md (영어)
|
||||||
|
- [X] README-KO.md (한글)
|
||||||
|
- [X] docs/20251021T113500--*.org (이 문서)
|
||||||
|
- [ ] LICENSE (Apache 2.0)
|
||||||
|
- [ ] .gitignore (Python, Emacs)
|
||||||
|
- [ ] SKILL.md (Denote 중심)
|
||||||
|
|
||||||
|
** Phase 2: Denote Core
|
||||||
|
- [ ] scripts/denote_parser.py (파일명 파싱)
|
||||||
|
- [ ] scripts/denote_links.py (링크 해결)
|
||||||
|
- [ ] scripts/denote_silo.py (silo 관리)
|
||||||
|
- [ ] denote-core.md (Denote 명세)
|
||||||
|
- [ ] denote-silo.md (Silo 가이드)
|
||||||
|
- [ ] 테스트 (3,000+ 파일)
|
||||||
|
|
||||||
|
** Phase 3: Knowledge Graph
|
||||||
|
- [ ] scripts/denote_graph.py (그래프 구축)
|
||||||
|
- [ ] denote-knowledge-graph.md (문서화)
|
||||||
|
- [ ] 성능 테스트 (캐싱, 인덱싱)
|
||||||
|
|
||||||
|
** Phase 4: Org-mode Base
|
||||||
|
- [ ] scripts/org_parser.py (orgparse)
|
||||||
|
- [ ] scripts/org_execute.py (코드 블록)
|
||||||
|
- [ ] scripts/org_export.py (export)
|
||||||
|
- [ ] orgmode-base.md (문서화)
|
||||||
|
- [ ] literate.md (Literate programming)
|
||||||
|
|
||||||
|
** Phase 5: 0.1 Release
|
||||||
|
- [ ] requirements.txt
|
||||||
|
- [ ] examples/ (기본, literate, denote)
|
||||||
|
- [ ] 전체 테스트
|
||||||
|
- [ ] Git commit & push
|
||||||
|
- [ ] GitHub Public 전환
|
||||||
|
- [ ] 커뮤니티 공유
|
||||||
|
|
||||||
|
* 다음 단계
|
||||||
|
|
||||||
|
** 즉시 실행
|
||||||
|
1. LICENSE 파일 (Apache 2.0)
|
||||||
|
2. .gitignore
|
||||||
|
3. Git 초기화 및 첫 커밋
|
||||||
|
4. SKILL.md 작성 시작
|
||||||
|
|
||||||
|
** 단기 (1주)
|
||||||
|
- Denote Core 스크립트 구현
|
||||||
|
- 기본 문서화
|
||||||
|
- 로컬 테스트
|
||||||
|
|
||||||
|
** 중기 (2주)
|
||||||
|
- Knowledge Graph 구현
|
||||||
|
- Org-mode 기능 추가
|
||||||
|
- 0.1 릴리즈
|
||||||
|
|
||||||
|
** 장기
|
||||||
|
- 커뮤니티 피드백
|
||||||
|
- Anthropic Skills 생태계 기여
|
||||||
|
- awesome-claude-skills PR
|
||||||
|
|
||||||
|
* 핵심 통찰
|
||||||
|
|
||||||
|
** Skills의 본질
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
**Skills = Domain Procedural Knowledge + Executable Scripts**
|
||||||
|
|
||||||
|
프롬프트: "이렇게 해봐" (일회성)
|
||||||
|
Skills: "이 도메인에서는 항상 이렇게 한다" (재사용)
|
||||||
|
|
||||||
|
프롬프트: Claude가 코드 생성
|
||||||
|
Skills: 검증된 스크립트 실행
|
||||||
|
|
||||||
|
프롬프트: 토큰 소모
|
||||||
|
Skills: 효율성
|
||||||
|
|
||||||
|
**Skills는 "신입 사원을 위한 온보딩 가이드"다**
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
** Denote-Org Skills의 가치
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
**PDF/XLSX가 복잡한 문서 포맷을 다루듯,
|
||||||
|
Denote-Org는 복잡한 지식 시스템을 다룬다.**
|
||||||
|
|
||||||
|
3,000+ 파일 지식 베이스는:
|
||||||
|
- 단순 텍스트 파일들이 아님
|
||||||
|
- 지식 그래프 (Denote links)
|
||||||
|
- 여러 도메인 (silos)
|
||||||
|
- Literate programming (실행 가능)
|
||||||
|
- 살아있는 시스템
|
||||||
|
|
||||||
|
**이것이 Skills가 필요한 이유다.**
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
** Life Sciences 패러다임 적용
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
Anthropic Life Sciences:
|
||||||
|
- PubMed (수백만 논문) + Claude = Scientific AI
|
||||||
|
|
||||||
|
Denote-Org Skills:
|
||||||
|
- Denote (3,000+ 파일) + Claude = Personal Knowledge AI
|
||||||
|
|
||||||
|
**같은 패러다임. Biology → Living 확장.**
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
* 참고 자료
|
||||||
|
|
||||||
|
** Anthropic 리소스
|
||||||
|
- [[https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills][Agent Skills Engineering Blog]]
|
||||||
|
- [[https://support.claude.com/en/articles/12512176-what-are-skills][What are Skills?]]
|
||||||
|
- [[https://github.com/anthropics/skills][Official Skills Repository]]
|
||||||
|
|
||||||
|
** Denote 리소스
|
||||||
|
- [[https://protesilaos.com/emacs/denote][Denote by Protesilaos Stavrou]]
|
||||||
|
- [[https://orgmode.org/][Org-mode]]
|
||||||
|
|
||||||
|
** 관련 프로젝트
|
||||||
|
- [[denote:20251015T093311][@힣: 시간과정신의방 -CONFIG 생태계]]
|
||||||
|
- [[denote:20251021T074500][Anthropic Life Sciences와 Tools for Life 패러다임]]
|
||||||
|
- [[denote:20240601T204208][† #에이아이온스클럽인터내쇼날]]
|
||||||
|
|
||||||
|
* 맺음말
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
이 프로젝트는 단순히 Org-mode를 Claude가 읽게 하려는 것이 아닙니다.
|
||||||
|
|
||||||
|
**Anthropic이 생명과학에서 증명한 패러다임을
|
||||||
|
개인 지식 관리로 확장하는 것입니다.**
|
||||||
|
|
||||||
|
Life Sciences (Biology) → Life Everything (Living)
|
||||||
|
|
||||||
|
PDF/XLSX Skills가 문서 포맷의 전문가를 만들듯,
|
||||||
|
Denote-Org Skills는 개인 지식 시스템의 전문가를 만듭니다.
|
||||||
|
|
||||||
|
**3,000+ 파일로 검증된 실제 시스템.**
|
||||||
|
**단순 변환기가 아닌 운영 시스템.**
|
||||||
|
**프롬프트가 아닌 Skills.**
|
||||||
|
|
||||||
|
이것이 Tools for Life의 구현입니다.
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
* 에이전트 피드백: Claude Opus 4.1 검토
|
||||||
|
|
||||||
|
** [2025-10-21 Tue 11:58] Opus 4.1 에이전트의 README 검토
|
||||||
|
|
||||||
|
다른 에이전트(claude-opus-4-1-20250805)가 README를 검토하고 피드백 제공.
|
||||||
|
Ultrathink 모드 사용 (2,296 tokens).
|
||||||
|
|
||||||
|
** 핵심 피드백 5가지
|
||||||
|
|
||||||
|
*** 1. SKILL.md 구조 (최우선!)
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
SKILL.md는 Claude가 직접 읽는 핵심 문서
|
||||||
|
|
||||||
|
필수 섹션:
|
||||||
|
- When to use this skill (트리거 명확히)
|
||||||
|
- What this skill does (기능)
|
||||||
|
- How to use effectively (효과적 사용법)
|
||||||
|
- Common pitfalls (흔한 실수)
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
→ **실행 계획:** SKILL.md 작성 시 이 구조 필수 반영
|
||||||
|
|
||||||
|
*** 2. 파일 경로 처리
|
||||||
|
|
||||||
|
#+begin_src python
|
||||||
|
# ❌ 하드코딩
|
||||||
|
silo = "~/org/"
|
||||||
|
|
||||||
|
# ✅ 확장 가능
|
||||||
|
import os
|
||||||
|
silo = os.path.expanduser("~/org/")
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
→ **실행 계획:** 모든 스크립트에서 os.path.expanduser() 사용
|
||||||
|
|
||||||
|
*** 3. 대용량 파일 최적화 (3,000+)
|
||||||
|
|
||||||
|
#+begin_src python
|
||||||
|
# 캐싱 전략
|
||||||
|
from functools import lru_cache
|
||||||
|
|
||||||
|
@lru_cache(maxsize=128)
|
||||||
|
def build_knowledge_graph(silo_path):
|
||||||
|
# 비용 높은 연산 캐싱
|
||||||
|
pass
|
||||||
|
|
||||||
|
# 스트리밍 처리
|
||||||
|
def find_files_generator(pattern):
|
||||||
|
for file in files:
|
||||||
|
yield file # 메모리 효율적
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
→ **실행 계획:** denote_graph.py에서 캐싱 필수, denote_finder.py는 generator 사용
|
||||||
|
|
||||||
|
*** 4. 에러 복구 전략
|
||||||
|
|
||||||
|
#+begin_src python
|
||||||
|
# Denote 링크 깨짐 처리
|
||||||
|
def resolve_denote_link(link_id):
|
||||||
|
try:
|
||||||
|
return find_exact_match(link_id)
|
||||||
|
except NotFoundError:
|
||||||
|
# Fallback: 부분 매칭
|
||||||
|
return find_partial_match(link_id[:8])
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
→ **실행 계획:** denote_links.py에 fallback 로직 구현
|
||||||
|
|
||||||
|
*** 5. Claude 제한사항
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
토큰 제한: 대량 검색 결과 요약 필요
|
||||||
|
실행 시간: 타임아웃 고려
|
||||||
|
메모리 사용: 그래프 크기 제한
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
→ **실행 계획:** 결과 페이징, 타임아웃 처리
|
||||||
|
|
||||||
|
** Edge Cases (놓치기 쉬운 경우들)
|
||||||
|
|
||||||
|
1. **Denote ID 충돌** - 같은 초에 생성된 파일
|
||||||
|
2. **Silo 경계 링크** - ~/org/ → ~/claude-memory/
|
||||||
|
3. **순환 참조** - Knowledge graph에서
|
||||||
|
4. **한글 인코딩** - 파일명 처리
|
||||||
|
5. **심볼릭 링크** - 실제 경로 해석
|
||||||
|
|
||||||
|
→ **실행 계획:** 각 케이스별 테스트 및 처리 로직
|
||||||
|
|
||||||
|
** 추가 제안 반영
|
||||||
|
|
||||||
|
*** Incremental Processing
|
||||||
|
#+begin_src python
|
||||||
|
def update_graph_incremental(changed_files):
|
||||||
|
"""전체 재구성 대신 변경분만 업데이트"""
|
||||||
|
pass
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** Denote 특화 기능 강화
|
||||||
|
- =#+filetags:= 파싱 정확도
|
||||||
|
- 날짜 범위 검색 (=202510*= 패턴)
|
||||||
|
- Backlinks (양방향 추적)
|
||||||
|
|
||||||
|
*** Org-babel 호환성
|
||||||
|
- =:results silent/output/value= 처리
|
||||||
|
- =:tangle= 경로 해석
|
||||||
|
|
||||||
|
*** 테스트 데이터셋
|
||||||
|
#+begin_example
|
||||||
|
tests/
|
||||||
|
├── small/ # 10개 파일 (빠른 테스트)
|
||||||
|
├── medium/ # 100개 파일 (기능 테스트)
|
||||||
|
└── large/ # 1000+ 파일 (성능 테스트)
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
*** 성능 모니터링
|
||||||
|
#+begin_src python
|
||||||
|
import time
|
||||||
|
from functools import wraps
|
||||||
|
|
||||||
|
def measure_performance(func):
|
||||||
|
@wraps(func)
|
||||||
|
def wrapper(*args, **kwargs):
|
||||||
|
start = time.time()
|
||||||
|
result = func(*args, **kwargs)
|
||||||
|
duration = time.time() - start
|
||||||
|
if duration > 1.0:
|
||||||
|
logger.warning(f"{func.__name__} took {duration:.2f}s")
|
||||||
|
return result
|
||||||
|
return wrapper
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** 피드백 종합 평가
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
**Opus 4.1의 평가:**
|
||||||
|
|
||||||
|
"이 프로젝트의 비전이 정말 좋네요!
|
||||||
|
'Life Sciences → Life Everything' 패러다임 확장은
|
||||||
|
Anthropic Skills의 본질을 잘 이해한 접근입니다."
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
** 반영 계획
|
||||||
|
|
||||||
|
*** 즉시 반영 (Phase 1)
|
||||||
|
1. ✅ SKILL.md 구조 설계 (When/What/How/Pitfalls)
|
||||||
|
2. ✅ 경로 처리 표준화 (os.path.expanduser)
|
||||||
|
3. ✅ Edge cases 리스트 작성
|
||||||
|
|
||||||
|
*** 단기 반영 (Phase 2)
|
||||||
|
4. 캐싱 전략 (lru_cache)
|
||||||
|
5. 에러 복구 로직
|
||||||
|
6. 테스트 데이터셋
|
||||||
|
|
||||||
|
*** 중기 반영 (Phase 3)
|
||||||
|
7. 성능 모니터링
|
||||||
|
8. Incremental processing
|
||||||
|
9. Documentation 강화
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**작성자:** @junghan0611
|
||||||
|
**최초 작성:** 2025-10-21T11:35:00+09:00
|
||||||
|
**최종 업데이트:** 2025-10-21T11:58:00+09:00
|
||||||
|
**피드백:** Claude Opus 4.1 (2025-10-21T11:58)
|
||||||
|
**상태:** 🟡 개발 중 (0.1 릴리즈 목표)
|
||||||
@@ -0,0 +1,420 @@
|
|||||||
|
#+title: Skills 에이전트 학습 실험
|
||||||
|
#+date: [2025-10-22 Tue 12:00]
|
||||||
|
#+filetags: :agent:learning:experiment:skills:
|
||||||
|
#+identifier: 20251022T120000
|
||||||
|
|
||||||
|
* Skills 에이전트 학습 실험
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: skills-에이전트-학습-실험
|
||||||
|
:END:
|
||||||
|
|
||||||
|
** 🎯 실험 목적
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 실험-목적
|
||||||
|
:END:
|
||||||
|
|
||||||
|
**에이전트 학습**: Skills 없이 vs 있을 때 에이전트의 행동 차이 관찰
|
||||||
|
|
||||||
|
*** 핵심 가설
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 핵심-가설
|
||||||
|
:END:
|
||||||
|
|
||||||
|
#+begin_quote
|
||||||
|
Skills가 있으면 에이전트가 **명확하게 다르게 행동**한다.
|
||||||
|
차이가 명확하지 않으면 Skills가 불필요한 것이다.
|
||||||
|
#+end_quote
|
||||||
|
|
||||||
|
** 🧪 실험 설계
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 실험-설계
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** 실험 조건
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 실험-조건
|
||||||
|
:END:
|
||||||
|
|
||||||
|
| 조건 | 설명 |
|
||||||
|
|------|------|
|
||||||
|
| **모델** | Haiku (우선), Sonnet (비교) |
|
||||||
|
| **환경** | Claude Code CLI |
|
||||||
|
| **비교** | Skills 없이 vs Skills 활성화 |
|
||||||
|
| **테스트** | PDF, XLSX 작업 |
|
||||||
|
|
||||||
|
*** 왜 Haiku 우선인가?
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 왜-haiku-우선인가
|
||||||
|
:END:
|
||||||
|
|
||||||
|
- 부담 없이 여러 번 테스트 가능
|
||||||
|
- Haiku로 되면 = Skills가 강력한 것
|
||||||
|
- Haiku로 안되면 = 모델 능력 문제일 수 있음
|
||||||
|
|
||||||
|
** 📋 실험 1: PDF 처리
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 실험-1-pdf-처리
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Step 1-A: Skills 없이 (Baseline)
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: step-1-a-skills-없이-baseline
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*에이전트가 수행할 작업*:
|
||||||
|
|
||||||
|
#+begin_src markdown
|
||||||
|
테스트 PDF 파일(test.pdf)에서:
|
||||||
|
1. 전체 텍스트 추출
|
||||||
|
2. 첫 번째 페이지만 분리
|
||||||
|
3. 두 개의 PDF 병합
|
||||||
|
|
||||||
|
결과를 보고하시오.
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*관찰 포인트*:
|
||||||
|
- [ ] 에이전트가 어떤 도구를 사용하는가?
|
||||||
|
- [ ] Python 라이브러리를 직접 코딩하는가?
|
||||||
|
- [ ] 실행 가능한 코드를 생성하는가?
|
||||||
|
- [ ] 에러가 발생하는가?
|
||||||
|
|
||||||
|
*학습 일지*:
|
||||||
|
#+begin_example
|
||||||
|
모델: Haiku / Sonnet
|
||||||
|
날짜:
|
||||||
|
결과:
|
||||||
|
- 사용 도구:
|
||||||
|
- 성공/실패:
|
||||||
|
- 특이사항:
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
*** Step 1-B: PDF Skill 활성화
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: step-1-b-pdf-skill-활성화
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*Skill 설치*:
|
||||||
|
|
||||||
|
#+begin_src bash
|
||||||
|
# 방법 1: 마켓플레이스
|
||||||
|
/plugin marketplace add anthropics/skills
|
||||||
|
/plugin install document-skills@anthropic-agent-skills
|
||||||
|
|
||||||
|
# 방법 2: 로컬 (이미 있음)
|
||||||
|
# ~/repos/3rd/snthropics-skills/document-skills/pdf/
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*에이전트가 수행할 작업* (동일):
|
||||||
|
|
||||||
|
#+begin_src markdown
|
||||||
|
PDF skill을 사용하여 test.pdf에서:
|
||||||
|
1. 전체 텍스트 추출
|
||||||
|
2. 첫 번째 페이지만 분리
|
||||||
|
3. 두 개의 PDF 병합
|
||||||
|
|
||||||
|
결과를 보고하시오.
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*관찰 포인트*:
|
||||||
|
- [ ] 에이전트가 PDF skill을 인식하는가?
|
||||||
|
- [ ] scripts/ 폴더의 Python 스크립트를 사용하는가?
|
||||||
|
- [ ] Step 1-A와 다른 접근 방식인가?
|
||||||
|
- [ ] 더 빠르거나 안정적인가?
|
||||||
|
|
||||||
|
*학습 일지*:
|
||||||
|
#+begin_example
|
||||||
|
모델: Haiku / Sonnet
|
||||||
|
날짜:
|
||||||
|
결과:
|
||||||
|
- Skill 인식 여부:
|
||||||
|
- 사용한 스크립트:
|
||||||
|
- Step 1-A와의 차이:
|
||||||
|
- 성공/실패:
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
*** Step 1-C: 비교 분석
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: step-1-c-비교-분석
|
||||||
|
:END:
|
||||||
|
|
||||||
|
| 기준 | Skills 없이 (1-A) | Skills 있을 때 (1-B) |
|
||||||
|
|------|-------------------|---------------------|
|
||||||
|
| 성공 여부 | | |
|
||||||
|
| 코드 품질 | | |
|
||||||
|
| 실행 시간 | | |
|
||||||
|
| 에러 처리 | | |
|
||||||
|
| 재현성 | | |
|
||||||
|
|
||||||
|
*결론*:
|
||||||
|
- Skills의 차이가 명확한가? [ ] 예 [ ] 아니오
|
||||||
|
- 이유:
|
||||||
|
|
||||||
|
** 📋 실험 2: XLSX 처리
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 실험-2-xlsx-처리
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Step 2-A: Skills 없이 (Baseline)
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: step-2-a-skills-없이-baseline
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*에이전트가 수행할 작업*:
|
||||||
|
|
||||||
|
#+begin_src markdown
|
||||||
|
Excel 파일(test.xlsx)을 생성하시오:
|
||||||
|
1. 3개 컬럼 (이름, 나이, 점수)
|
||||||
|
2. 5개 행 데이터
|
||||||
|
3. 점수 평균 계산 (수식 사용)
|
||||||
|
4. 컬럼 헤더 볼드 처리
|
||||||
|
|
||||||
|
결과를 보고하시오.
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*학습 일지*:
|
||||||
|
#+begin_example
|
||||||
|
모델: Haiku / Sonnet
|
||||||
|
날짜:
|
||||||
|
결과:
|
||||||
|
- 수식이 작동하는가?
|
||||||
|
- 포맷팅이 적용되는가?
|
||||||
|
- 생성 코드:
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
*** Step 2-B: XLSX Skill 활성화
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: step-2-b-xlsx-skill-활성화
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*에이전트가 수행할 작업* (동일):
|
||||||
|
|
||||||
|
#+begin_src markdown
|
||||||
|
XLSX skill을 사용하여 Excel 파일 생성:
|
||||||
|
1. 3개 컬럼 (이름, 나이, 점수)
|
||||||
|
2. 5개 행 데이터
|
||||||
|
3. 점수 평균 계산 (수식 사용)
|
||||||
|
4. 컬럼 헤더 볼드 처리
|
||||||
|
|
||||||
|
결과를 보고하시오.
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*관찰 포인트*:
|
||||||
|
- [ ] recalc.py가 호출되는가?
|
||||||
|
- [ ] 수식 계산이 더 정확한가?
|
||||||
|
- [ ] LibreOffice 통합이 보이는가?
|
||||||
|
|
||||||
|
*학습 일지*:
|
||||||
|
#+begin_example
|
||||||
|
모델: Haiku / Sonnet
|
||||||
|
날짜:
|
||||||
|
결과:
|
||||||
|
- recalc.py 사용 여부:
|
||||||
|
- Step 2-A와의 차이:
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
*** Step 2-C: 비교 분석
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: step-2-c-비교-분석
|
||||||
|
:END:
|
||||||
|
|
||||||
|
| 기준 | Skills 없이 (2-A) | Skills 있을 때 (2-B) |
|
||||||
|
|------|-------------------|---------------------|
|
||||||
|
| 파일 생성 | | |
|
||||||
|
| 수식 작동 | | |
|
||||||
|
| 포맷팅 | | |
|
||||||
|
| 코드 복잡도 | | |
|
||||||
|
|
||||||
|
*결론*:
|
||||||
|
- XLSX skill의 가치가 있는가? [ ] 예 [ ] 아니오
|
||||||
|
- recalc.py의 역할:
|
||||||
|
|
||||||
|
** 📋 실험 3: 복잡한 작업
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 실험-3-복잡한-작업
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Step 3: PDF 폼 채우기 (고난도)
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: step-3-pdf-폼-채우기-고난도
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*에이전트가 수행할 작업*:
|
||||||
|
|
||||||
|
#+begin_src markdown
|
||||||
|
fillable PDF form(form.pdf)에 데이터를 채우시오:
|
||||||
|
- Name: "홍길동"
|
||||||
|
- Age: "30"
|
||||||
|
- Email: "hong@example.com"
|
||||||
|
|
||||||
|
결과를 보고하시오.
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*Skills 없이 결과*:
|
||||||
|
#+begin_example
|
||||||
|
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
*Skills 있을 때 결과*:
|
||||||
|
#+begin_example
|
||||||
|
사용 스크립트:
|
||||||
|
- check_fillable_fields.py
|
||||||
|
- extract_form_field_info.py
|
||||||
|
- fill_fillable_fields.py
|
||||||
|
- check_bounding_boxes.py
|
||||||
|
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
*결론*:
|
||||||
|
- 이 작업은 Skills 없이 가능한가? [ ] 예 [ ] 아니오
|
||||||
|
- bounding box 계산이 필요한가? [ ] 예 [ ] 아니오
|
||||||
|
|
||||||
|
** 🔬 모델별 비교
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 모델별-비교
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Haiku vs Sonnet
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: haiku-vs-sonnet
|
||||||
|
:END:
|
||||||
|
|
||||||
|
| 작업 | Haiku (Skills 없이) | Haiku (Skills 있음) | Sonnet (Skills 없이) | Sonnet (Skills 있음) |
|
||||||
|
|------|---------------------|---------------------|---------------------|---------------------|
|
||||||
|
| PDF 텍스트 추출 | | | | |
|
||||||
|
| PDF 병합 | | | | |
|
||||||
|
| XLSX 생성 | | | | |
|
||||||
|
| PDF 폼 채우기 | | | | |
|
||||||
|
|
||||||
|
*인사이트*:
|
||||||
|
- Haiku로 Skills가 작동하는가?
|
||||||
|
- Sonnet과 차이가 얼마나 나는가?
|
||||||
|
- Skills가 모델 능력을 보완하는가?
|
||||||
|
|
||||||
|
** 🎓 claude-memory와의 차이
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: claude-memory와의-차이
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** 실험 4: Denote 파일 찾기
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 실험-4-denote-파일-찾기
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*에이전트가 수행할 작업*:
|
||||||
|
|
||||||
|
#+begin_src markdown
|
||||||
|
~/org/llmlog/ 에서 "skills" 태그가 있는 파일을 모두 찾으시오.
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*현재 방식 (claude-memory + CLAUDE.md)*:
|
||||||
|
#+begin_example
|
||||||
|
결과:
|
||||||
|
- 사용 도구: Glob, Grep
|
||||||
|
- 소요 시간:
|
||||||
|
- 토큰 사용:
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
*만약 denote-org skill이 있다면*:
|
||||||
|
#+begin_example
|
||||||
|
예상:
|
||||||
|
- denote_finder.py --tags skills
|
||||||
|
- 캐싱된 결과
|
||||||
|
- 토큰 최적화?
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
*질문*:
|
||||||
|
- [ ] Glob/Grep으로 충분한가?
|
||||||
|
- [ ] denote_finder.py가 더 빠른가?
|
||||||
|
- [ ] 3,000+ 파일에서 차이가 나는가?
|
||||||
|
- [ ] 복잡한 알고리즘이 필요한가?
|
||||||
|
|
||||||
|
** 📊 최종 판단 프레임워크
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 최종-판단-프레임워크
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** Skills 필요성 체크리스트
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: skills-필요성-체크리스트
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*PDF/XLSX Skills 검증*:
|
||||||
|
- [ ] Skills 없이 vs 있을 때 **명확한 차이**가 있다
|
||||||
|
- [ ] 복잡한 알고리즘 (bounding box 수준)이 필요하다
|
||||||
|
- [ ] 외부 스크립트 실행이 필수적이다
|
||||||
|
- [ ] 단순 프롬프트로 불가능한 작업이다
|
||||||
|
- [ ] Haiku 모델에서도 작동한다
|
||||||
|
|
||||||
|
*org-mode-skills 검증*:
|
||||||
|
- [ ] Denote 파일 찾기가 복잡한 알고리즘인가?
|
||||||
|
- [ ] Glob/Grep으로 충분하지 않은가?
|
||||||
|
- [ ] 3,000+ 파일에서 성능 차이가 있는가?
|
||||||
|
- [ ] scripts 없이는 불가능한 작업인가?
|
||||||
|
- [ ] claude-memory와 레이어가 분리되는가?
|
||||||
|
|
||||||
|
*** 경계선 정의
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 경계선-정의
|
||||||
|
:END:
|
||||||
|
|
||||||
|
| 시스템 | 목적 | 내용 | 변경 빈도 | 예시 |
|
||||||
|
|--------|------|------|-----------|------|
|
||||||
|
| **claude-memory** | | | | |
|
||||||
|
| **Skills** | | | | |
|
||||||
|
|
||||||
|
*실험 후 채우기*
|
||||||
|
|
||||||
|
** 🎯 최종 결론
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 최종-결론
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** org-mode-skills 필요한가?
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: org-mode-skills-필요한가
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*판단*: [ ] 필요 [ ] 불필요 [ ] 부분적
|
||||||
|
|
||||||
|
*이유*:
|
||||||
|
|
||||||
|
*실험 결과 요약*:
|
||||||
|
1. PDF/XLSX Skills의 가치:
|
||||||
|
2. claude-memory와의 차이:
|
||||||
|
3. Denote 작업의 복잡도:
|
||||||
|
|
||||||
|
*다음 액션*:
|
||||||
|
- [ ] org-mode-skills 개발 진행
|
||||||
|
- [ ] CLAUDE.md에 Denote 섹션 추가로 충분
|
||||||
|
- [ ] 다른 접근 방법:
|
||||||
|
|
||||||
|
** 📝 실험 노트
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 실험-노트
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** 날짜:
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 날짜
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** 발견:
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 발견
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** 의문점:
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 의문점
|
||||||
|
:END:
|
||||||
|
|
||||||
|
*** 인사이트:
|
||||||
|
:PROPERTIES:
|
||||||
|
:CUSTOM_ID: 인사이트
|
||||||
|
:END:
|
||||||
|
|
||||||
|
--------------
|
||||||
|
|
||||||
|
*Created*: 2025-10-22T12:00
|
||||||
|
*Purpose*: 에이전트 학습 - Skills 효과 검증
|
||||||
|
*Method*: 실험 기반 비교 분석
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
#+title: Claude Skills 등록·관리 간단 가이드
|
||||||
|
#+date: [2025-11-18 Tue 12:00]
|
||||||
|
#+filetags: :skills:claude:orgmode:
|
||||||
|
#+identifier: 20251118T120000
|
||||||
|
|
||||||
|
* Claude Skills 등록·관리 가이드 :WORKLOG:
|
||||||
|
|
||||||
|
이 문서는 Anthropic 공식 skills 세트와 개인 orgmode-skills 세트를
|
||||||
|
Claude Code에서 어떻게 등록·설치하는지 최소 절차만 정리한 메모입니다.
|
||||||
|
|
||||||
|
** 1. Anthropic 공식 skills (anthropic-agent-skills)
|
||||||
|
|
||||||
|
공식 예제/문서 스킬 리포:
|
||||||
|
- 로컬 경로: =/home/goqual/repos/3rd/skills=
|
||||||
|
- 핵심 파일: =.claude-plugin/marketplace.json=
|
||||||
|
- name: =anthropic-agent-skills=
|
||||||
|
- plugins:
|
||||||
|
- =document-skills=
|
||||||
|
- =example-skills=
|
||||||
|
|
||||||
|
Claude Code에서 마켓플레이스 등록:
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
/plugin marketplace add anthropics/skills
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
그 다음 실제 스킬 번들 설치:
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
/plugin install document-skills@anthropic-agent-skills
|
||||||
|
/plugin install example-skills@anthropic-agent-skills
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
- =document-skills@anthropic-agent-skills= → PDF/XLSX/DOCX/PPTX 문서 스킬 세트
|
||||||
|
- =example-skills@anthropic-agent-skills= → algorithmic-art, mcp-builder 등 예제 스킬 세트
|
||||||
|
|
||||||
|
** 2. 개인 orgmode-skills 마켓플레이스 (junghan-skills)
|
||||||
|
|
||||||
|
개인 Denote/Org + 문서 스킬 묶음:
|
||||||
|
- 리포: =/home/goqual/repos/gh/orgmode-skills=
|
||||||
|
- 스킬: 루트에 =SKILL.md= (name: =denote-org=)
|
||||||
|
- 마켓플레이스 메타데이터:
|
||||||
|
- =.claude-plugin/marketplace.json=
|
||||||
|
- name: =junghan-skills=
|
||||||
|
- plugins:
|
||||||
|
- =denote-org-pack=
|
||||||
|
- skills:
|
||||||
|
- =./= (denote-org)
|
||||||
|
- =../skills/document-skills/pdf=
|
||||||
|
- =../skills/document-skills/xlsx=
|
||||||
|
|
||||||
|
Claude Code에서 마켓플레이스 등록:
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
/plugin marketplace add /home/goqual/repos/gh/orgmode-skills
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
개인 스킬 번들 설치:
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
/plugin install denote-org-pack@junghan-skills
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
이 한 번으로 다음이 함께 활성화됨:
|
||||||
|
- =denote-org= : Denote/org-mode PKM 스킬
|
||||||
|
- =pdf= : Anthropic PDF 스킬
|
||||||
|
- =xlsx= : Anthropic XLSX 스킬
|
||||||
|
|
||||||
|
** 3. 세션 시작 시 최소 커맨드 요약
|
||||||
|
|
||||||
|
새 Claude Code 세션에서 org + 문서 스킬 세트를 쓰고 싶을 때:
|
||||||
|
|
||||||
|
1) 한 번만 해두면 되는 것 (이미 완료됨):
|
||||||
|
- =/plugin marketplace add anthropics/skills=
|
||||||
|
- =/plugin marketplace add /home/goqual/repos/gh/orgmode-skills=
|
||||||
|
|
||||||
|
2) 각 세션에서 실행할 것:
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
/plugin install document-skills@anthropic-agent-skills ;; 공식 문서 스킬 세트
|
||||||
|
/plugin install denote-org-pack@junghan-skills ;; 개인 orgmode + PDF/XLSX 세트
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
이후 Denote/Org 관련 작업에서는 먼저 =denote-org= 스킬을 가정하고,
|
||||||
|
PDF/XLSX 편집·분석이 필요할 때는 =document-skills= 를 함께 활용하는 것을 기본 전략으로 합니다.
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
#+title: OpenCode에서 glg-skills 활용 가이드
|
||||||
|
#+date: [2025-11-18 Tue 12:10]
|
||||||
|
#+filetags: :skills:glg:opencode:
|
||||||
|
#+identifier: 20251118T121000
|
||||||
|
|
||||||
|
* OpenCode에서 glg-skills 활용 가이드 :WORKLOG:
|
||||||
|
|
||||||
|
이 문서는 Claude-Code가 아닌 **OpenCode 환경**(현재 이 에이전트)에서
|
||||||
|
`glg-skills`(orgmode-skills)와 Anthropic document-skills를 어떻게 같이
|
||||||
|
활용할지에 대한 최소 지침입니다.
|
||||||
|
|
||||||
|
** 1. 리포 위치와 역할
|
||||||
|
|
||||||
|
- glg-skills (개인 스킬 세트)
|
||||||
|
- 경로: =/home/goqual/repos/gh/orgmode-skills=
|
||||||
|
- 핵심:
|
||||||
|
- 루트 =SKILL.md=: =denote-org= 스킬 정의
|
||||||
|
- =scripts/org_headings_toc.py=: org 헤딩 TOC 추출 스크립트
|
||||||
|
- =docs/20251118T120000--claude-skills-등록-관리-가이드__skills_claude.org=: Claude용 가이드
|
||||||
|
|
||||||
|
- Anthropic skills (document-skills 포함)
|
||||||
|
- 경로: =/home/goqual/repos/3rd/skills=
|
||||||
|
- 이 리포 안의 =document-skills/= 는 PDF/XLSX/DOCX/PPTX 작업 참고용
|
||||||
|
- OpenCode에서는 여기 스크립트/문서를 **직접 호출/참조**하는 방식으로 사용
|
||||||
|
|
||||||
|
OpenCode에서는 `/plugin` 시스템이 없으므로, 이 두 리포는
|
||||||
|
"스킬 레퍼런스 + 스크립트 모음" 으로 취급합니다.
|
||||||
|
|
||||||
|
** 2. OpenCode에서 org 헤딩 구조 활용
|
||||||
|
|
||||||
|
org 파일을 분석할 때, 에이전트에게 다음과 같이 요청합니다:
|
||||||
|
|
||||||
|
1. **헤딩 구조 먼저**
|
||||||
|
- =scripts/org_headings_toc.py= 를 사용해 TOC 생성
|
||||||
|
- 예시 (에이전트가 내부적으로 실행하는 bash):
|
||||||
|
|
||||||
|
#+begin_example
|
||||||
|
python /home/goqual/repos/gh/orgmode-skills/scripts/org_headings_toc.py \
|
||||||
|
/home/goqual/repos/gh/orgmode-skills/docs/20251021T113500--denote-org-skills-프로젝트-시작-배경-및-작업-로그__project_skills_denote_anthropic_worklog.org
|
||||||
|
#+end_example
|
||||||
|
|
||||||
|
- 출력 형식: =LEVEL<TAB>TITLE=
|
||||||
|
- 예: =1\tDenote-Org Skills 프로젝트 시작=, =2\t히스토리= ...
|
||||||
|
|
||||||
|
2. **히스토리/History 섹션 우선 확인**
|
||||||
|
- TOC 결과 중
|
||||||
|
- =* 히스토리=, =* HISTORY=, =* History=, =* 작업 로그=, =* Changelog= 등
|
||||||
|
- 버전/변화 기록 섹션을 먼저 열어 요약
|
||||||
|
|
||||||
|
3. **관심 섹션만 본문 읽기**
|
||||||
|
- TOC를 기반으로 실제로 필요한 헤딩만 OpenCode에서 `read` 도구로 읽게 함
|
||||||
|
- 전 파일 grep은 보조 수단으로만 사용
|
||||||
|
|
||||||
|
이 전략은 glg-skills의 =SKILL.md= 에 이미 문서화되어 있으며,
|
||||||
|
OpenCode에서는 이 문서를 **행동 기준**으로 삼습니다.
|
||||||
|
|
||||||
|
** 3. Silo 인식과 경로 규칙 (OpenCode 관점)
|
||||||
|
|
||||||
|
OpenCode에서 org 파일을 다룰 때, 아래 경로를 **Denote/org silo** 로 취급합니다:
|
||||||
|
|
||||||
|
- =~/org/**=
|
||||||
|
- =~/org/meta/**=
|
||||||
|
- =~/org/bib/**=
|
||||||
|
- =~/org/notes/**=
|
||||||
|
- =~/org/llmlog/**=
|
||||||
|
- =~/claude-memory/**=
|
||||||
|
- =~/repos/gh/*/docs/**=
|
||||||
|
- =~/repos/work/*/docs/**=
|
||||||
|
|
||||||
|
특히:
|
||||||
|
- =~/org/meta=: 메타 모델/설계
|
||||||
|
- =~/org/bib=: 참고문헌/레퍼런스
|
||||||
|
- =~/org/notes=: 장문의 생각/노트
|
||||||
|
- =~/org/llmlog=: LLM 대화 로그
|
||||||
|
- 리포의 =docs/=: 해당 코드/프로젝트에 직접 연결된 문서
|
||||||
|
|
||||||
|
OpenCode 에이전트에게 요청할 때,
|
||||||
|
"이 파일/문서는 glg-skills의 silo 규칙을 따라 해석해줘"라고 명시하면,
|
||||||
|
위 경로 규칙을 기준으로 지식베이스를 바라보도록 유도할 수 있습니다.
|
||||||
|
|
||||||
|
** 4. document-skills와의 연계 (OpenCode)
|
||||||
|
|
||||||
|
Anthropic document-skills는 Claude-Code용 skills지만,
|
||||||
|
OpenCode에서는 다음 방식으로 간접 활용할 수 있습니다:
|
||||||
|
|
||||||
|
- =/home/goqual/repos/3rd/skills/document-skills/pdf/SKILL.md=
|
||||||
|
- PDF 처리 절차/모범 사례 참고 (스크립트 이름, 워크플로)
|
||||||
|
- =/home/goqual/repos/3rd/skills/document-skills/xlsx/SKILL.md=
|
||||||
|
- Excel 공식/구조 보존 규칙 참고
|
||||||
|
|
||||||
|
필요하다면, 여기 나온 Python 스크립트 패턴을
|
||||||
|
별도 OpenCode 전용 스크립트로 이식해 glg-skills 안에 포함시키고,
|
||||||
|
SKILL.md에 그 사용법을 추가하는 식으로 점진적으로 통합합니다.
|
||||||
|
|
||||||
|
** 5. 요약: OpenCode용 glg-skills 사용 패턴
|
||||||
|
|
||||||
|
- **지식 레퍼런스**:
|
||||||
|
- glg-skills: Denote/org 구조, silo 개념, 헤딩/히스토리 우선 전략
|
||||||
|
- document-skills: PDF/XLSX 등 문서 작업 절차 참고
|
||||||
|
|
||||||
|
- **실행 도구**:
|
||||||
|
- =scripts/org_headings_toc.py=: org 헤딩 TOC 추출
|
||||||
|
- 향후 필요 시 PDF/XLSX용 보조 스크립트 추가 예정
|
||||||
|
|
||||||
|
- **요청 패턴 예시**:
|
||||||
|
- "이 org 문서를 glg-skills 기준으로 읽어줘: 먼저 헤딩 TOC, 그 다음 히스토리, 그 다음 관련 섹션만 자세히"
|
||||||
|
- "~/org/meta 와 ~/org/notes 도 glg-skills의 silo 규칙대로 참고해서 설계 의도를 함께 봐줘"
|
||||||
|
|
||||||
|
이 문서는 OpenCode 환경에서 glg-skills를 사용할 때의
|
||||||
|
"최소한의 기억 장치" 역할을 합니다.
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
# Reference Documentation for Denote Org
|
||||||
|
|
||||||
|
This is a placeholder for detailed reference documentation.
|
||||||
|
Replace with actual reference content or delete if not needed.
|
||||||
|
|
||||||
|
Example real reference docs from other skills:
|
||||||
|
- product-management/references/communication.md - Comprehensive guide for status updates
|
||||||
|
- product-management/references/context_building.md - Deep-dive on gathering context
|
||||||
|
- bigquery/references/ - API references and query examples
|
||||||
|
|
||||||
|
## When Reference Docs Are Useful
|
||||||
|
|
||||||
|
Reference docs are ideal for:
|
||||||
|
- Comprehensive API documentation
|
||||||
|
- Detailed workflow guides
|
||||||
|
- Complex multi-step processes
|
||||||
|
- Information too lengthy for main SKILL.md
|
||||||
|
- Content that's only needed for specific use cases
|
||||||
|
|
||||||
|
## Structure Suggestions
|
||||||
|
|
||||||
|
### API Reference Example
|
||||||
|
- Overview
|
||||||
|
- Authentication
|
||||||
|
- Endpoints with examples
|
||||||
|
- Error codes
|
||||||
|
- Rate limits
|
||||||
|
|
||||||
|
### Workflow Guide Example
|
||||||
|
- Prerequisites
|
||||||
|
- Step-by-step instructions
|
||||||
|
- Common patterns
|
||||||
|
- Troubleshooting
|
||||||
|
- Best practices
|
||||||
19
skills/junghan0611__org-mode-skills/scripts/example.py
Executable file
19
skills/junghan0611__org-mode-skills/scripts/example.py
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Example helper script for denote-org
|
||||||
|
|
||||||
|
This is a placeholder script that can be executed directly.
|
||||||
|
Replace with actual implementation or delete if not needed.
|
||||||
|
|
||||||
|
Example real scripts from other skills:
|
||||||
|
- pdf/scripts/fill_fillable_fields.py - Fills PDF form fields
|
||||||
|
- pdf/scripts/convert_pdf_to_images.py - Converts PDF pages to images
|
||||||
|
"""
|
||||||
|
|
||||||
|
def main():
|
||||||
|
print("This is an example script for denote-org")
|
||||||
|
# TODO: Add actual script logic here
|
||||||
|
# This could be data processing, file conversion, API calls, etc.
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""org_headings_toc.py
|
||||||
|
|
||||||
|
Extract a lightweight table of contents (TOC) from an org-mode file.
|
||||||
|
|
||||||
|
This script is intentionally simple and robust: it does not try to fully
|
||||||
|
parse org-mode semantics, only heading levels and titles. It is designed
|
||||||
|
for agents to call when they need a quick structural overview of a large
|
||||||
|
org file before deciding which sections to read in detail.
|
||||||
|
|
||||||
|
Behavior:
|
||||||
|
- Reads the given org file line by line.
|
||||||
|
- Detects headings by leading '*' characters (Org-style headings).
|
||||||
|
- Determines heading level by the number of consecutive '*' at the
|
||||||
|
beginning of the line.
|
||||||
|
- Strips TODO keywords and leading tags like "* TODO", "* DONE" when
|
||||||
|
extracting the title.
|
||||||
|
- Prints a simple TOC to stdout in the form:
|
||||||
|
LEVEL<TAB>TITLE
|
||||||
|
where LEVEL is an integer (1 for top-level headings, 2 for subheadings, ...).
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
python org_headings_toc.py path/to/file.org
|
||||||
|
|
||||||
|
This script is meant to be called by Claude/agents via a shell command
|
||||||
|
when using the denote-org skill.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
TODO_KEYWORDS = {
|
||||||
|
"TODO",
|
||||||
|
"DONE",
|
||||||
|
"WAITING",
|
||||||
|
"HOLD",
|
||||||
|
"CANCELLED",
|
||||||
|
"NEXT",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def extract_headings(path: Path):
|
||||||
|
"""Yield (level, title) tuples for each heading in the org file."""
|
||||||
|
try:
|
||||||
|
with path.open("r", encoding="utf-8") as f:
|
||||||
|
for line in f:
|
||||||
|
if not line.lstrip().startswith("*"):
|
||||||
|
continue
|
||||||
|
|
||||||
|
stripped = line.rstrip("\n")
|
||||||
|
# Count leading '*' characters
|
||||||
|
i = 0
|
||||||
|
while i < len(stripped) and stripped[i] == "*":
|
||||||
|
i += 1
|
||||||
|
level = i
|
||||||
|
|
||||||
|
# Require at least one space after the stars
|
||||||
|
if level == 0 or level >= len(stripped) or stripped[level] != " ":
|
||||||
|
continue
|
||||||
|
|
||||||
|
# Extract raw title part
|
||||||
|
raw_title = stripped[level + 1 :].strip()
|
||||||
|
|
||||||
|
# Remove TODO keywords at the beginning of the title
|
||||||
|
parts = raw_title.split()
|
||||||
|
if parts and parts[0] in TODO_KEYWORDS:
|
||||||
|
parts = parts[1:]
|
||||||
|
title = " ".join(parts).strip()
|
||||||
|
|
||||||
|
if title:
|
||||||
|
yield level, title
|
||||||
|
except FileNotFoundError:
|
||||||
|
print(f"ERROR: File not found: {path}", file=sys.stderr)
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
print(f"ERROR: Cannot decode file as UTF-8: {path}", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
|
def main(argv=None):
|
||||||
|
if argv is None:
|
||||||
|
argv = sys.argv[1:]
|
||||||
|
|
||||||
|
if not argv:
|
||||||
|
print("Usage: org_headings_toc.py path/to/file.org", file=sys.stderr)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
path = Path(argv[0]).expanduser()
|
||||||
|
|
||||||
|
for level, title in extract_headings(path):
|
||||||
|
# LEVEL<TAB>TITLE format for easy parsing by the agent
|
||||||
|
print(f"{level}\t{title}")
|
||||||
|
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
202
skills/junghan0611__org-mode-skills/skill-creator/LICENSE.txt
Normal file
202
skills/junghan0611__org-mode-skills/skill-creator/LICENSE.txt
Normal file
@@ -0,0 +1,202 @@
|
|||||||
|
|
||||||
|
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 reasonable and customary use in 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 Additional Liability. 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 additional liability.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
APPENDIX: How to apply the Apache License to your work.
|
||||||
|
|
||||||
|
To apply the Apache License to your work, attach the following
|
||||||
|
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||||
|
replaced with your own identifying information. (Don't include
|
||||||
|
the brackets!) The text should be enclosed in the appropriate
|
||||||
|
comment syntax for the file format. We also recommend that a
|
||||||
|
file or class name and description of purpose be included on the
|
||||||
|
same "printed page" as the copyright notice for easier
|
||||||
|
identification within third-party archives.
|
||||||
|
|
||||||
|
Copyright [yyyy] [name of copyright owner]
|
||||||
|
|
||||||
|
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.
|
||||||
209
skills/junghan0611__org-mode-skills/skill-creator/SKILL.md
Normal file
209
skills/junghan0611__org-mode-skills/skill-creator/SKILL.md
Normal file
@@ -0,0 +1,209 @@
|
|||||||
|
---
|
||||||
|
name: skill-creator
|
||||||
|
description: Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
|
||||||
|
license: Complete terms in LICENSE.txt
|
||||||
|
---
|
||||||
|
|
||||||
|
# Skill Creator
|
||||||
|
|
||||||
|
This skill provides guidance for creating effective skills.
|
||||||
|
|
||||||
|
## About Skills
|
||||||
|
|
||||||
|
Skills are modular, self-contained packages that extend Claude's capabilities by providing
|
||||||
|
specialized knowledge, workflows, and tools. Think of them as "onboarding guides" for specific
|
||||||
|
domains or tasks—they transform Claude from a general-purpose agent into a specialized agent
|
||||||
|
equipped with procedural knowledge that no model can fully possess.
|
||||||
|
|
||||||
|
### What Skills Provide
|
||||||
|
|
||||||
|
1. Specialized workflows - Multi-step procedures for specific domains
|
||||||
|
2. Tool integrations - Instructions for working with specific file formats or APIs
|
||||||
|
3. Domain expertise - Company-specific knowledge, schemas, business logic
|
||||||
|
4. Bundled resources - Scripts, references, and assets for complex and repetitive tasks
|
||||||
|
|
||||||
|
### Anatomy of a Skill
|
||||||
|
|
||||||
|
Every skill consists of a required SKILL.md file and optional bundled resources:
|
||||||
|
|
||||||
|
```
|
||||||
|
skill-name/
|
||||||
|
├── SKILL.md (required)
|
||||||
|
│ ├── YAML frontmatter metadata (required)
|
||||||
|
│ │ ├── name: (required)
|
||||||
|
│ │ └── description: (required)
|
||||||
|
│ └── Markdown instructions (required)
|
||||||
|
└── Bundled Resources (optional)
|
||||||
|
├── scripts/ - Executable code (Python/Bash/etc.)
|
||||||
|
├── references/ - Documentation intended to be loaded into context as needed
|
||||||
|
└── assets/ - Files used in output (templates, icons, fonts, etc.)
|
||||||
|
```
|
||||||
|
|
||||||
|
#### SKILL.md (required)
|
||||||
|
|
||||||
|
**Metadata Quality:** The `name` and `description` in YAML frontmatter determine when Claude will use the skill. Be specific about what the skill does and when to use it. Use the third-person (e.g. "This skill should be used when..." instead of "Use this skill when...").
|
||||||
|
|
||||||
|
#### Bundled Resources (optional)
|
||||||
|
|
||||||
|
##### Scripts (`scripts/`)
|
||||||
|
|
||||||
|
Executable code (Python/Bash/etc.) for tasks that require deterministic reliability or are repeatedly rewritten.
|
||||||
|
|
||||||
|
- **When to include**: When the same code is being rewritten repeatedly or deterministic reliability is needed
|
||||||
|
- **Example**: `scripts/rotate_pdf.py` for PDF rotation tasks
|
||||||
|
- **Benefits**: Token efficient, deterministic, may be executed without loading into context
|
||||||
|
- **Note**: Scripts may still need to be read by Claude for patching or environment-specific adjustments
|
||||||
|
|
||||||
|
##### References (`references/`)
|
||||||
|
|
||||||
|
Documentation and reference material intended to be loaded as needed into context to inform Claude's process and thinking.
|
||||||
|
|
||||||
|
- **When to include**: For documentation that Claude should reference while working
|
||||||
|
- **Examples**: `references/finance.md` for financial schemas, `references/mnda.md` for company NDA template, `references/policies.md` for company policies, `references/api_docs.md` for API specifications
|
||||||
|
- **Use cases**: Database schemas, API documentation, domain knowledge, company policies, detailed workflow guides
|
||||||
|
- **Benefits**: Keeps SKILL.md lean, loaded only when Claude determines it's needed
|
||||||
|
- **Best practice**: If files are large (>10k words), include grep search patterns in SKILL.md
|
||||||
|
- **Avoid duplication**: Information should live in either SKILL.md or references files, not both. Prefer references files for detailed information unless it's truly core to the skill—this keeps SKILL.md lean while making information discoverable without hogging the context window. Keep only essential procedural instructions and workflow guidance in SKILL.md; move detailed reference material, schemas, and examples to references files.
|
||||||
|
|
||||||
|
##### Assets (`assets/`)
|
||||||
|
|
||||||
|
Files not intended to be loaded into context, but rather used within the output Claude produces.
|
||||||
|
|
||||||
|
- **When to include**: When the skill needs files that will be used in the final output
|
||||||
|
- **Examples**: `assets/logo.png` for brand assets, `assets/slides.pptx` for PowerPoint templates, `assets/frontend-template/` for HTML/React boilerplate, `assets/font.ttf` for typography
|
||||||
|
- **Use cases**: Templates, images, icons, boilerplate code, fonts, sample documents that get copied or modified
|
||||||
|
- **Benefits**: Separates output resources from documentation, enables Claude to use files without loading them into context
|
||||||
|
|
||||||
|
### Progressive Disclosure Design Principle
|
||||||
|
|
||||||
|
Skills use a three-level loading system to manage context efficiently:
|
||||||
|
|
||||||
|
1. **Metadata (name + description)** - Always in context (~100 words)
|
||||||
|
2. **SKILL.md body** - When skill triggers (<5k words)
|
||||||
|
3. **Bundled resources** - As needed by Claude (Unlimited*)
|
||||||
|
|
||||||
|
*Unlimited because scripts can be executed without reading into context window.
|
||||||
|
|
||||||
|
## Skill Creation Process
|
||||||
|
|
||||||
|
To create a skill, follow the "Skill Creation Process" in order, skipping steps only if there is a clear reason why they are not applicable.
|
||||||
|
|
||||||
|
### Step 1: Understanding the Skill with Concrete Examples
|
||||||
|
|
||||||
|
Skip this step only when the skill's usage patterns are already clearly understood. It remains valuable even when working with an existing skill.
|
||||||
|
|
||||||
|
To create an effective skill, clearly understand concrete examples of how the skill will be used. This understanding can come from either direct user examples or generated examples that are validated with user feedback.
|
||||||
|
|
||||||
|
For example, when building an image-editor skill, relevant questions include:
|
||||||
|
|
||||||
|
- "What functionality should the image-editor skill support? Editing, rotating, anything else?"
|
||||||
|
- "Can you give some examples of how this skill would be used?"
|
||||||
|
- "I can imagine users asking for things like 'Remove the red-eye from this image' or 'Rotate this image'. Are there other ways you imagine this skill being used?"
|
||||||
|
- "What would a user say that should trigger this skill?"
|
||||||
|
|
||||||
|
To avoid overwhelming users, avoid asking too many questions in a single message. Start with the most important questions and follow up as needed for better effectiveness.
|
||||||
|
|
||||||
|
Conclude this step when there is a clear sense of the functionality the skill should support.
|
||||||
|
|
||||||
|
### Step 2: Planning the Reusable Skill Contents
|
||||||
|
|
||||||
|
To turn concrete examples into an effective skill, analyze each example by:
|
||||||
|
|
||||||
|
1. Considering how to execute on the example from scratch
|
||||||
|
2. Identifying what scripts, references, and assets would be helpful when executing these workflows repeatedly
|
||||||
|
|
||||||
|
Example: When building a `pdf-editor` skill to handle queries like "Help me rotate this PDF," the analysis shows:
|
||||||
|
|
||||||
|
1. Rotating a PDF requires re-writing the same code each time
|
||||||
|
2. A `scripts/rotate_pdf.py` script would be helpful to store in the skill
|
||||||
|
|
||||||
|
Example: When designing a `frontend-webapp-builder` skill for queries like "Build me a todo app" or "Build me a dashboard to track my steps," the analysis shows:
|
||||||
|
|
||||||
|
1. Writing a frontend webapp requires the same boilerplate HTML/React each time
|
||||||
|
2. An `assets/hello-world/` template containing the boilerplate HTML/React project files would be helpful to store in the skill
|
||||||
|
|
||||||
|
Example: When building a `big-query` skill to handle queries like "How many users have logged in today?" the analysis shows:
|
||||||
|
|
||||||
|
1. Querying BigQuery requires re-discovering the table schemas and relationships each time
|
||||||
|
2. A `references/schema.md` file documenting the table schemas would be helpful to store in the skill
|
||||||
|
|
||||||
|
To establish the skill's contents, analyze each concrete example to create a list of the reusable resources to include: scripts, references, and assets.
|
||||||
|
|
||||||
|
### Step 3: Initializing the Skill
|
||||||
|
|
||||||
|
At this point, it is time to actually create the skill.
|
||||||
|
|
||||||
|
Skip this step only if the skill being developed already exists, and iteration or packaging is needed. In this case, continue to the next step.
|
||||||
|
|
||||||
|
When creating a new skill from scratch, always run the `init_skill.py` script. The script conveniently generates a new template skill directory that automatically includes everything a skill requires, making the skill creation process much more efficient and reliable.
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
scripts/init_skill.py <skill-name> --path <output-directory>
|
||||||
|
```
|
||||||
|
|
||||||
|
The script:
|
||||||
|
|
||||||
|
- Creates the skill directory at the specified path
|
||||||
|
- Generates a SKILL.md template with proper frontmatter and TODO placeholders
|
||||||
|
- Creates example resource directories: `scripts/`, `references/`, and `assets/`
|
||||||
|
- Adds example files in each directory that can be customized or deleted
|
||||||
|
|
||||||
|
After initialization, customize or remove the generated SKILL.md and example files as needed.
|
||||||
|
|
||||||
|
### Step 4: Edit the Skill
|
||||||
|
|
||||||
|
When editing the (newly-generated or existing) skill, remember that the skill is being created for another instance of Claude to use. Focus on including information that would be beneficial and non-obvious to Claude. Consider what procedural knowledge, domain-specific details, or reusable assets would help another Claude instance execute these tasks more effectively.
|
||||||
|
|
||||||
|
#### Start with Reusable Skill Contents
|
||||||
|
|
||||||
|
To begin implementation, start with the reusable resources identified above: `scripts/`, `references/`, and `assets/` files. Note that this step may require user input. For example, when implementing a `brand-guidelines` skill, the user may need to provide brand assets or templates to store in `assets/`, or documentation to store in `references/`.
|
||||||
|
|
||||||
|
Also, delete any example files and directories not needed for the skill. The initialization script creates example files in `scripts/`, `references/`, and `assets/` to demonstrate structure, but most skills won't need all of them.
|
||||||
|
|
||||||
|
#### Update SKILL.md
|
||||||
|
|
||||||
|
**Writing Style:** Write the entire skill using **imperative/infinitive form** (verb-first instructions), not second person. Use objective, instructional language (e.g., "To accomplish X, do Y" rather than "You should do X" or "If you need to do X"). This maintains consistency and clarity for AI consumption.
|
||||||
|
|
||||||
|
To complete SKILL.md, answer the following questions:
|
||||||
|
|
||||||
|
1. What is the purpose of the skill, in a few sentences?
|
||||||
|
2. When should the skill be used?
|
||||||
|
3. In practice, how should Claude use the skill? All reusable skill contents developed above should be referenced so that Claude knows how to use them.
|
||||||
|
|
||||||
|
### Step 5: Packaging a Skill
|
||||||
|
|
||||||
|
Once the skill is ready, it should be packaged into a distributable zip file that gets shared with the user. The packaging process automatically validates the skill first to ensure it meets all requirements:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
scripts/package_skill.py <path/to/skill-folder>
|
||||||
|
```
|
||||||
|
|
||||||
|
Optional output directory specification:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
scripts/package_skill.py <path/to/skill-folder> ./dist
|
||||||
|
```
|
||||||
|
|
||||||
|
The packaging script will:
|
||||||
|
|
||||||
|
1. **Validate** the skill automatically, checking:
|
||||||
|
- YAML frontmatter format and required fields
|
||||||
|
- Skill naming conventions and directory structure
|
||||||
|
- Description completeness and quality
|
||||||
|
- File organization and resource references
|
||||||
|
|
||||||
|
2. **Package** the skill if validation passes, creating a zip file named after the skill (e.g., `my-skill.zip`) that includes all files and maintains the proper directory structure for distribution.
|
||||||
|
|
||||||
|
If validation fails, the script will report the errors and exit without creating a package. Fix any validation errors and run the packaging command again.
|
||||||
|
|
||||||
|
### Step 6: Iterate
|
||||||
|
|
||||||
|
After testing the skill, users may request improvements. Often this happens right after using the skill, with fresh context of how the skill performed.
|
||||||
|
|
||||||
|
**Iteration workflow:**
|
||||||
|
1. Use the skill on real tasks
|
||||||
|
2. Notice struggles or inefficiencies
|
||||||
|
3. Identify how SKILL.md or bundled resources should be updated
|
||||||
|
4. Implement changes and test again
|
||||||
303
skills/junghan0611__org-mode-skills/skill-creator/scripts/init_skill.py
Executable file
303
skills/junghan0611__org-mode-skills/skill-creator/scripts/init_skill.py
Executable file
@@ -0,0 +1,303 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Skill Initializer - Creates a new skill from template
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
init_skill.py <skill-name> --path <path>
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
init_skill.py my-new-skill --path skills/public
|
||||||
|
init_skill.py my-api-helper --path skills/private
|
||||||
|
init_skill.py custom-skill --path /custom/location
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
SKILL_TEMPLATE = """---
|
||||||
|
name: {skill_name}
|
||||||
|
description: [TODO: Complete and informative explanation of what the skill does and when to use it. Include WHEN to use this skill - specific scenarios, file types, or tasks that trigger it.]
|
||||||
|
---
|
||||||
|
|
||||||
|
# {skill_title}
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
[TODO: 1-2 sentences explaining what this skill enables]
|
||||||
|
|
||||||
|
## Structuring This Skill
|
||||||
|
|
||||||
|
[TODO: Choose the structure that best fits this skill's purpose. Common patterns:
|
||||||
|
|
||||||
|
**1. Workflow-Based** (best for sequential processes)
|
||||||
|
- Works well when there are clear step-by-step procedures
|
||||||
|
- Example: DOCX skill with "Workflow Decision Tree" → "Reading" → "Creating" → "Editing"
|
||||||
|
- Structure: ## Overview → ## Workflow Decision Tree → ## Step 1 → ## Step 2...
|
||||||
|
|
||||||
|
**2. Task-Based** (best for tool collections)
|
||||||
|
- Works well when the skill offers different operations/capabilities
|
||||||
|
- Example: PDF skill with "Quick Start" → "Merge PDFs" → "Split PDFs" → "Extract Text"
|
||||||
|
- Structure: ## Overview → ## Quick Start → ## Task Category 1 → ## Task Category 2...
|
||||||
|
|
||||||
|
**3. Reference/Guidelines** (best for standards or specifications)
|
||||||
|
- Works well for brand guidelines, coding standards, or requirements
|
||||||
|
- Example: Brand styling with "Brand Guidelines" → "Colors" → "Typography" → "Features"
|
||||||
|
- Structure: ## Overview → ## Guidelines → ## Specifications → ## Usage...
|
||||||
|
|
||||||
|
**4. Capabilities-Based** (best for integrated systems)
|
||||||
|
- Works well when the skill provides multiple interrelated features
|
||||||
|
- Example: Product Management with "Core Capabilities" → numbered capability list
|
||||||
|
- Structure: ## Overview → ## Core Capabilities → ### 1. Feature → ### 2. Feature...
|
||||||
|
|
||||||
|
Patterns can be mixed and matched as needed. Most skills combine patterns (e.g., start with task-based, add workflow for complex operations).
|
||||||
|
|
||||||
|
Delete this entire "Structuring This Skill" section when done - it's just guidance.]
|
||||||
|
|
||||||
|
## [TODO: Replace with the first main section based on chosen structure]
|
||||||
|
|
||||||
|
[TODO: Add content here. See examples in existing skills:
|
||||||
|
- Code samples for technical skills
|
||||||
|
- Decision trees for complex workflows
|
||||||
|
- Concrete examples with realistic user requests
|
||||||
|
- References to scripts/templates/references as needed]
|
||||||
|
|
||||||
|
## Resources
|
||||||
|
|
||||||
|
This skill includes example resource directories that demonstrate how to organize different types of bundled resources:
|
||||||
|
|
||||||
|
### scripts/
|
||||||
|
Executable code (Python/Bash/etc.) that can be run directly to perform specific operations.
|
||||||
|
|
||||||
|
**Examples from other skills:**
|
||||||
|
- PDF skill: `fill_fillable_fields.py`, `extract_form_field_info.py` - utilities for PDF manipulation
|
||||||
|
- DOCX skill: `document.py`, `utilities.py` - Python modules for document processing
|
||||||
|
|
||||||
|
**Appropriate for:** Python scripts, shell scripts, or any executable code that performs automation, data processing, or specific operations.
|
||||||
|
|
||||||
|
**Note:** Scripts may be executed without loading into context, but can still be read by Claude for patching or environment adjustments.
|
||||||
|
|
||||||
|
### references/
|
||||||
|
Documentation and reference material intended to be loaded into context to inform Claude's process and thinking.
|
||||||
|
|
||||||
|
**Examples from other skills:**
|
||||||
|
- Product management: `communication.md`, `context_building.md` - detailed workflow guides
|
||||||
|
- BigQuery: API reference documentation and query examples
|
||||||
|
- Finance: Schema documentation, company policies
|
||||||
|
|
||||||
|
**Appropriate for:** In-depth documentation, API references, database schemas, comprehensive guides, or any detailed information that Claude should reference while working.
|
||||||
|
|
||||||
|
### assets/
|
||||||
|
Files not intended to be loaded into context, but rather used within the output Claude produces.
|
||||||
|
|
||||||
|
**Examples from other skills:**
|
||||||
|
- Brand styling: PowerPoint template files (.pptx), logo files
|
||||||
|
- Frontend builder: HTML/React boilerplate project directories
|
||||||
|
- Typography: Font files (.ttf, .woff2)
|
||||||
|
|
||||||
|
**Appropriate for:** Templates, boilerplate code, document templates, images, icons, fonts, or any files meant to be copied or used in the final output.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Any unneeded directories can be deleted.** Not every skill requires all three types of resources.
|
||||||
|
"""
|
||||||
|
|
||||||
|
EXAMPLE_SCRIPT = '''#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Example helper script for {skill_name}
|
||||||
|
|
||||||
|
This is a placeholder script that can be executed directly.
|
||||||
|
Replace with actual implementation or delete if not needed.
|
||||||
|
|
||||||
|
Example real scripts from other skills:
|
||||||
|
- pdf/scripts/fill_fillable_fields.py - Fills PDF form fields
|
||||||
|
- pdf/scripts/convert_pdf_to_images.py - Converts PDF pages to images
|
||||||
|
"""
|
||||||
|
|
||||||
|
def main():
|
||||||
|
print("This is an example script for {skill_name}")
|
||||||
|
# TODO: Add actual script logic here
|
||||||
|
# This could be data processing, file conversion, API calls, etc.
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
'''
|
||||||
|
|
||||||
|
EXAMPLE_REFERENCE = """# Reference Documentation for {skill_title}
|
||||||
|
|
||||||
|
This is a placeholder for detailed reference documentation.
|
||||||
|
Replace with actual reference content or delete if not needed.
|
||||||
|
|
||||||
|
Example real reference docs from other skills:
|
||||||
|
- product-management/references/communication.md - Comprehensive guide for status updates
|
||||||
|
- product-management/references/context_building.md - Deep-dive on gathering context
|
||||||
|
- bigquery/references/ - API references and query examples
|
||||||
|
|
||||||
|
## When Reference Docs Are Useful
|
||||||
|
|
||||||
|
Reference docs are ideal for:
|
||||||
|
- Comprehensive API documentation
|
||||||
|
- Detailed workflow guides
|
||||||
|
- Complex multi-step processes
|
||||||
|
- Information too lengthy for main SKILL.md
|
||||||
|
- Content that's only needed for specific use cases
|
||||||
|
|
||||||
|
## Structure Suggestions
|
||||||
|
|
||||||
|
### API Reference Example
|
||||||
|
- Overview
|
||||||
|
- Authentication
|
||||||
|
- Endpoints with examples
|
||||||
|
- Error codes
|
||||||
|
- Rate limits
|
||||||
|
|
||||||
|
### Workflow Guide Example
|
||||||
|
- Prerequisites
|
||||||
|
- Step-by-step instructions
|
||||||
|
- Common patterns
|
||||||
|
- Troubleshooting
|
||||||
|
- Best practices
|
||||||
|
"""
|
||||||
|
|
||||||
|
EXAMPLE_ASSET = """# Example Asset File
|
||||||
|
|
||||||
|
This placeholder represents where asset files would be stored.
|
||||||
|
Replace with actual asset files (templates, images, fonts, etc.) or delete if not needed.
|
||||||
|
|
||||||
|
Asset files are NOT intended to be loaded into context, but rather used within
|
||||||
|
the output Claude produces.
|
||||||
|
|
||||||
|
Example asset files from other skills:
|
||||||
|
- Brand guidelines: logo.png, slides_template.pptx
|
||||||
|
- Frontend builder: hello-world/ directory with HTML/React boilerplate
|
||||||
|
- Typography: custom-font.ttf, font-family.woff2
|
||||||
|
- Data: sample_data.csv, test_dataset.json
|
||||||
|
|
||||||
|
## Common Asset Types
|
||||||
|
|
||||||
|
- Templates: .pptx, .docx, boilerplate directories
|
||||||
|
- Images: .png, .jpg, .svg, .gif
|
||||||
|
- Fonts: .ttf, .otf, .woff, .woff2
|
||||||
|
- Boilerplate code: Project directories, starter files
|
||||||
|
- Icons: .ico, .svg
|
||||||
|
- Data files: .csv, .json, .xml, .yaml
|
||||||
|
|
||||||
|
Note: This is a text placeholder. Actual assets can be any file type.
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
def title_case_skill_name(skill_name):
|
||||||
|
"""Convert hyphenated skill name to Title Case for display."""
|
||||||
|
return ' '.join(word.capitalize() for word in skill_name.split('-'))
|
||||||
|
|
||||||
|
|
||||||
|
def init_skill(skill_name, path):
|
||||||
|
"""
|
||||||
|
Initialize a new skill directory with template SKILL.md.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
skill_name: Name of the skill
|
||||||
|
path: Path where the skill directory should be created
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Path to created skill directory, or None if error
|
||||||
|
"""
|
||||||
|
# Determine skill directory path
|
||||||
|
skill_dir = Path(path).resolve() / skill_name
|
||||||
|
|
||||||
|
# Check if directory already exists
|
||||||
|
if skill_dir.exists():
|
||||||
|
print(f"❌ Error: Skill directory already exists: {skill_dir}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
# Create skill directory
|
||||||
|
try:
|
||||||
|
skill_dir.mkdir(parents=True, exist_ok=False)
|
||||||
|
print(f"✅ Created skill directory: {skill_dir}")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"❌ Error creating directory: {e}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
# Create SKILL.md from template
|
||||||
|
skill_title = title_case_skill_name(skill_name)
|
||||||
|
skill_content = SKILL_TEMPLATE.format(
|
||||||
|
skill_name=skill_name,
|
||||||
|
skill_title=skill_title
|
||||||
|
)
|
||||||
|
|
||||||
|
skill_md_path = skill_dir / 'SKILL.md'
|
||||||
|
try:
|
||||||
|
skill_md_path.write_text(skill_content)
|
||||||
|
print("✅ Created SKILL.md")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"❌ Error creating SKILL.md: {e}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
# Create resource directories with example files
|
||||||
|
try:
|
||||||
|
# Create scripts/ directory with example script
|
||||||
|
scripts_dir = skill_dir / 'scripts'
|
||||||
|
scripts_dir.mkdir(exist_ok=True)
|
||||||
|
example_script = scripts_dir / 'example.py'
|
||||||
|
example_script.write_text(EXAMPLE_SCRIPT.format(skill_name=skill_name))
|
||||||
|
example_script.chmod(0o755)
|
||||||
|
print("✅ Created scripts/example.py")
|
||||||
|
|
||||||
|
# Create references/ directory with example reference doc
|
||||||
|
references_dir = skill_dir / 'references'
|
||||||
|
references_dir.mkdir(exist_ok=True)
|
||||||
|
example_reference = references_dir / 'api_reference.md'
|
||||||
|
example_reference.write_text(EXAMPLE_REFERENCE.format(skill_title=skill_title))
|
||||||
|
print("✅ Created references/api_reference.md")
|
||||||
|
|
||||||
|
# Create assets/ directory with example asset placeholder
|
||||||
|
assets_dir = skill_dir / 'assets'
|
||||||
|
assets_dir.mkdir(exist_ok=True)
|
||||||
|
example_asset = assets_dir / 'example_asset.txt'
|
||||||
|
example_asset.write_text(EXAMPLE_ASSET)
|
||||||
|
print("✅ Created assets/example_asset.txt")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"❌ Error creating resource directories: {e}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
# Print next steps
|
||||||
|
print(f"\n✅ Skill '{skill_name}' initialized successfully at {skill_dir}")
|
||||||
|
print("\nNext steps:")
|
||||||
|
print("1. Edit SKILL.md to complete the TODO items and update the description")
|
||||||
|
print("2. Customize or delete the example files in scripts/, references/, and assets/")
|
||||||
|
print("3. Run the validator when ready to check the skill structure")
|
||||||
|
|
||||||
|
return skill_dir
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
if len(sys.argv) < 4 or sys.argv[2] != '--path':
|
||||||
|
print("Usage: init_skill.py <skill-name> --path <path>")
|
||||||
|
print("\nSkill name requirements:")
|
||||||
|
print(" - Hyphen-case identifier (e.g., 'data-analyzer')")
|
||||||
|
print(" - Lowercase letters, digits, and hyphens only")
|
||||||
|
print(" - Max 40 characters")
|
||||||
|
print(" - Must match directory name exactly")
|
||||||
|
print("\nExamples:")
|
||||||
|
print(" init_skill.py my-new-skill --path skills/public")
|
||||||
|
print(" init_skill.py my-api-helper --path skills/private")
|
||||||
|
print(" init_skill.py custom-skill --path /custom/location")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
skill_name = sys.argv[1]
|
||||||
|
path = sys.argv[3]
|
||||||
|
|
||||||
|
print(f"🚀 Initializing skill: {skill_name}")
|
||||||
|
print(f" Location: {path}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
result = init_skill(skill_name, path)
|
||||||
|
|
||||||
|
if result:
|
||||||
|
sys.exit(0)
|
||||||
|
else:
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
110
skills/junghan0611__org-mode-skills/skill-creator/scripts/package_skill.py
Executable file
110
skills/junghan0611__org-mode-skills/skill-creator/scripts/package_skill.py
Executable file
@@ -0,0 +1,110 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Skill Packager - Creates a distributable zip file of a skill folder
|
||||||
|
|
||||||
|
Usage:
|
||||||
|
python utils/package_skill.py <path/to/skill-folder> [output-directory]
|
||||||
|
|
||||||
|
Example:
|
||||||
|
python utils/package_skill.py skills/public/my-skill
|
||||||
|
python utils/package_skill.py skills/public/my-skill ./dist
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import zipfile
|
||||||
|
from pathlib import Path
|
||||||
|
from quick_validate import validate_skill
|
||||||
|
|
||||||
|
|
||||||
|
def package_skill(skill_path, output_dir=None):
|
||||||
|
"""
|
||||||
|
Package a skill folder into a zip file.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
skill_path: Path to the skill folder
|
||||||
|
output_dir: Optional output directory for the zip file (defaults to current directory)
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
Path to the created zip file, or None if error
|
||||||
|
"""
|
||||||
|
skill_path = Path(skill_path).resolve()
|
||||||
|
|
||||||
|
# Validate skill folder exists
|
||||||
|
if not skill_path.exists():
|
||||||
|
print(f"❌ Error: Skill folder not found: {skill_path}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
if not skill_path.is_dir():
|
||||||
|
print(f"❌ Error: Path is not a directory: {skill_path}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
# Validate SKILL.md exists
|
||||||
|
skill_md = skill_path / "SKILL.md"
|
||||||
|
if not skill_md.exists():
|
||||||
|
print(f"❌ Error: SKILL.md not found in {skill_path}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
# Run validation before packaging
|
||||||
|
print("🔍 Validating skill...")
|
||||||
|
valid, message = validate_skill(skill_path)
|
||||||
|
if not valid:
|
||||||
|
print(f"❌ Validation failed: {message}")
|
||||||
|
print(" Please fix the validation errors before packaging.")
|
||||||
|
return None
|
||||||
|
print(f"✅ {message}\n")
|
||||||
|
|
||||||
|
# Determine output location
|
||||||
|
skill_name = skill_path.name
|
||||||
|
if output_dir:
|
||||||
|
output_path = Path(output_dir).resolve()
|
||||||
|
output_path.mkdir(parents=True, exist_ok=True)
|
||||||
|
else:
|
||||||
|
output_path = Path.cwd()
|
||||||
|
|
||||||
|
zip_filename = output_path / f"{skill_name}.zip"
|
||||||
|
|
||||||
|
# Create the zip file
|
||||||
|
try:
|
||||||
|
with zipfile.ZipFile(zip_filename, 'w', zipfile.ZIP_DEFLATED) as zipf:
|
||||||
|
# Walk through the skill directory
|
||||||
|
for file_path in skill_path.rglob('*'):
|
||||||
|
if file_path.is_file():
|
||||||
|
# Calculate the relative path within the zip
|
||||||
|
arcname = file_path.relative_to(skill_path.parent)
|
||||||
|
zipf.write(file_path, arcname)
|
||||||
|
print(f" Added: {arcname}")
|
||||||
|
|
||||||
|
print(f"\n✅ Successfully packaged skill to: {zip_filename}")
|
||||||
|
return zip_filename
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
print(f"❌ Error creating zip file: {e}")
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
if len(sys.argv) < 2:
|
||||||
|
print("Usage: python utils/package_skill.py <path/to/skill-folder> [output-directory]")
|
||||||
|
print("\nExample:")
|
||||||
|
print(" python utils/package_skill.py skills/public/my-skill")
|
||||||
|
print(" python utils/package_skill.py skills/public/my-skill ./dist")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
skill_path = sys.argv[1]
|
||||||
|
output_dir = sys.argv[2] if len(sys.argv) > 2 else None
|
||||||
|
|
||||||
|
print(f"📦 Packaging skill: {skill_path}")
|
||||||
|
if output_dir:
|
||||||
|
print(f" Output directory: {output_dir}")
|
||||||
|
print()
|
||||||
|
|
||||||
|
result = package_skill(skill_path, output_dir)
|
||||||
|
|
||||||
|
if result:
|
||||||
|
sys.exit(0)
|
||||||
|
else:
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
65
skills/junghan0611__org-mode-skills/skill-creator/scripts/quick_validate.py
Executable file
65
skills/junghan0611__org-mode-skills/skill-creator/scripts/quick_validate.py
Executable file
@@ -0,0 +1,65 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Quick validation script for skills - minimal version
|
||||||
|
"""
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
def validate_skill(skill_path):
|
||||||
|
"""Basic validation of a skill"""
|
||||||
|
skill_path = Path(skill_path)
|
||||||
|
|
||||||
|
# Check SKILL.md exists
|
||||||
|
skill_md = skill_path / 'SKILL.md'
|
||||||
|
if not skill_md.exists():
|
||||||
|
return False, "SKILL.md not found"
|
||||||
|
|
||||||
|
# Read and validate frontmatter
|
||||||
|
content = skill_md.read_text()
|
||||||
|
if not content.startswith('---'):
|
||||||
|
return False, "No YAML frontmatter found"
|
||||||
|
|
||||||
|
# Extract frontmatter
|
||||||
|
match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
|
||||||
|
if not match:
|
||||||
|
return False, "Invalid frontmatter format"
|
||||||
|
|
||||||
|
frontmatter = match.group(1)
|
||||||
|
|
||||||
|
# Check required fields
|
||||||
|
if 'name:' not in frontmatter:
|
||||||
|
return False, "Missing 'name' in frontmatter"
|
||||||
|
if 'description:' not in frontmatter:
|
||||||
|
return False, "Missing 'description' in frontmatter"
|
||||||
|
|
||||||
|
# Extract name for validation
|
||||||
|
name_match = re.search(r'name:\s*(.+)', frontmatter)
|
||||||
|
if name_match:
|
||||||
|
name = name_match.group(1).strip()
|
||||||
|
# Check naming convention (hyphen-case: lowercase with hyphens)
|
||||||
|
if not re.match(r'^[a-z0-9-]+$', name):
|
||||||
|
return False, f"Name '{name}' should be hyphen-case (lowercase letters, digits, and hyphens only)"
|
||||||
|
if name.startswith('-') or name.endswith('-') or '--' in name:
|
||||||
|
return False, f"Name '{name}' cannot start/end with hyphen or contain consecutive hyphens"
|
||||||
|
|
||||||
|
# Extract and validate description
|
||||||
|
desc_match = re.search(r'description:\s*(.+)', frontmatter)
|
||||||
|
if desc_match:
|
||||||
|
description = desc_match.group(1).strip()
|
||||||
|
# Check for angle brackets
|
||||||
|
if '<' in description or '>' in description:
|
||||||
|
return False, "Description cannot contain angle brackets (< or >)"
|
||||||
|
|
||||||
|
return True, "Skill is valid!"
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
if len(sys.argv) != 2:
|
||||||
|
print("Usage: python quick_validate.py <skill_directory>")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
valid, message = validate_skill(sys.argv[1])
|
||||||
|
print(message)
|
||||||
|
sys.exit(0 if valid else 1)
|
||||||
Reference in New Issue
Block a user