Org Ecosystem

This skill should be used when the user asks to "write org", "org-mode", "org file", ".org file", "org syntax", "org document", "org babel", "org export", "org agenda", "org capture", "GTD", "literate programming", "org publishing", or "org-mode workflow". Provides comprehensive Org-mode patterns and best practices.

$ 安裝

git clone https://github.com/takeokunn/nixos-configuration /tmp/nixos-configuration && cp -r /tmp/nixos-configuration/home-manager/programs/claude-code/skills/org-ecosystem ~/.claude/skills/nixos-configuration

// tip: Run this command in your terminal to install the skill


name: Org Ecosystem description: This skill should be used when the user asks to "write org", "org-mode", "org file", ".org file", "org syntax", "org document", "org babel", "org export", "org agenda", "org capture", "GTD", "literate programming", "org publishing", or "org-mode workflow". Provides comprehensive Org-mode patterns and best practices.

<org_syntax> Hierarchical outline structure with stars

  • Top-level heading ** Second-level heading *** Third-level heading
  1. First ordered item
  2. Second ordered item
  • Checkbox item
  • Completed checkbox

#+BEGIN_EXAMPLE Verbatim text, no markup processing. #+END_EXAMPLE

#+BEGIN_CENTER Centered text. #+END_CENTER

#+BEGIN_VERSE Poetry or formatted text. #+END_VERSE

[fn:1] Footnote definition.

Or inline[fn:: inline footnote definition]. </org_syntax>

<gtd_workflow> Task state workflow configuration #+TODO: TODO(t) NEXT(n) WAITING(w@/!) | DONE(d!) CANCELLED(c@)

  • TODO Buy groceries
  • NEXT Write report
  • WAITING Review from team :@john:
  • DONE Complete project
  • CANCELLED Obsolete task @ prompts for note, ! records timestamp, | separates active from done states

(setq org-agenda-custom-commands '(("d" "Dashboard" ((agenda "" ((org-agenda-span 7))) (todo "NEXT" ((org-agenda-overriding-header "Next Actions"))) (todo "WAITING" ((org-agenda-overriding-header "Waiting For"))))) ("w" "Weekly Review" ((agenda "" ((org-agenda-span 7) (org-agenda-start-on-weekday 1))) (stuck "") (todo "TODO")))))

(setq org-refile-use-outline-path 'file) (setq org-outline-path-complete-in-steps nil) (setq org-refile-allow-creating-parent-nodes 'confirm) C-c C-w to refile entry, C-u C-c C-w to jump to target

(setq org-clock-persist t) (setq org-clock-in-resume t) (setq org-clock-out-remove-zero-time-clocks t) (setq org-clock-report-include-clocking-task t) C-c C-x C-i clock in, C-c C-x C-o clock out, C-c C-x C-r insert clock report

  • TODO Call dentist :@phone:urgent:

(setq org-tag-alist '((:startgroup) ("@home" . ?h) ("@work" . ?w) (:endgroup) ("urgent" . ?u) ("important" . ?i)))

(setq org-archive-subtree-save-file-p t) C-c C-x C-a archive subtree, C-c C-x C-s archive sibling <decision_tree name="task_state_selection"> What is the current status of the task? TODO NEXT WAITING DONE CANCELLED </decision_tree> </gtd_workflow>

#+RESULTS: example-block : Hello from Python : Item 0 : Item 1 : Item 2

#+BEGIN_SRC shell :dir /tmp :results silent ls -la #+END_SRC

#+BEGIN_SRC python :session py :results output

Persistent session across blocks

import sys print(sys.version) #+END_SRC Header arguments:

  • :results (value, output, silent, replace, append)
  • :exports (code, results, both, none)
  • :var (variable binding)
  • :dir (working directory)
  • :session (persistent session)
  • :tangle (file to tangle to)
  • :noweb (noweb reference expansion)

#+BEGIN_SRC python :tangle ./script.py :shebang "#!/usr/bin/env python3" def main(): print("Generated from org file")

if name == "main": main() #+END_SRC

#+BEGIN_SRC nix :tangle ./default.nix :mkdirp yes { pkgs ? import <nixpkgs> {} }: pkgs.hello #+END_SRC C-c C-v t to tangle current file, :mkdirp yes to create directories

#+NAME: main-function #+BEGIN_SRC python :noweb-ref main def main(): print("Running main") #+END_SRC

#+BEGIN_SRC python :tangle ./program.py :noweb yes <<imports>>

<<main>>

if name == "main": main() #+END_SRC

#+RESULTS: : 6

#+BEGIN_SRC python :results output print("line 1") print("line 2") #+END_SRC

#+RESULTS: : line 1 : line 2

#+BEGIN_SRC elisp :results table '(("Name" "Age") ("Alice" 30) ("Bob" 25)) #+END_SRC

#+RESULTS: | Name | Age | | Alice | 30 | | Bob | 25 |

(setq org-confirm-babel-evaluate nil) (setq org-src-preserve-indentation t) (setq org-src-tab-acts-natively t) (setq org-edit-src-content-indentation 0)

Today is src_elisp{(format-time-string "%Y-%m-%d")}. <decision_tree name="results_type"> What kind of output do you need? :results value :results output :results table :results raw :results silent </decision_tree>

#+SETUPFILE: ./theme.setup

(setq org-html-validation-link nil) (setq org-html-head-include-scripts nil) (setq org-html-head-include-default-style nil) (setq org-html-doctype "html5") (setq org-html-html5-fancy t) C-c C-e h h to export to HTML file

(setq org-latex-pdf-process '("latexmk -pdf -shell-escape %f"))

(add-to-list 'org-latex-classes '("report" "\documentclass{report}" ("\chapter{%s}" . "\chapter*{%s}") ("\section{%s}" . "\section*{%s}"))) C-c C-e l p to export to PDF via LaTeX

  • Introduction ** First Slide
  • Point one
  • Point two

** Second Slide #+ATTR_BEAMER: :overlay <+->

  • Appears first
  • Appears second
  • Appears third
  • Conclusion ** Summary Key takeaways here. H:2 means level-2 headings become frames

(require 'ox-md) (require 'ox-gfm) ; GitHub Flavored Markdown C-c C-e m m to export to Markdown

  • Not exported :noexport:

#+BEGIN_COMMENT This entire block is not exported. #+END_COMMENT

Text for export only. @@html:<br>@@ continues.

#+BEGIN_EXPORT html <div class="custom">Raw HTML here</div> #+END_EXPORT <decision_tree name="export_backend"> What is the target format? HTML (ox-html) PDF via LaTeX (ox-latex) Beamer (ox-beamer) Markdown (ox-md, ox-gfm) ODT (ox-odt) </decision_tree>

<best_practices> Use one file per major project or area of responsibility Keep inbox.org for quick captures, refile regularly Use consistent TODO state workflow across all files Add SCHEDULED or DEADLINE to time-sensitive tasks Use tags for context (@home, @work, @phone) not categories Archive completed subtrees periodically Use org-id for stable cross-file links Set :EFFORT: property for time estimation Use column view for project overviews Configure org-agenda-custom-commands for common views </best_practices>

<anti_patterns> Putting everything in one org file Split by project, area, or topic; use org-agenda-files

<error_escalation> Minor formatting inconsistency Fix and continue Babel block execution error Debug block, check language support Export failure or corrupted output Check document structure, present options to user Data loss from failed tangle or corrupted file Block operation, require explicit user acknowledgment </error_escalation>

<related_agents> Implementation of org document structures and babel configurations Documentation generation from org files Architecture for complex org-based systems </related_agents>

<related_skills> Emacs Lisp configuration for org-mode customization Symbol operations for navigating org structures Fetch latest org-mode documentation Documentation patterns applicable to org export </related_skills>

Repository

takeokunn
takeokunn
Author
takeokunn/nixos-configuration/home-manager/programs/claude-code/skills/org-ecosystem
52
Stars
0
Forks
Updated5d ago
Added6d ago