closing-issues
Close a GitHub issue with a synthesis comment as a flowing graph — validate the synthesis, post the closing comment, close, then run a pluggable callback (e.g. memory store) detached. Use when closing an issue should also capture the LEARNING (not just the diff log) and when the post-close work shouldn't block the close ack.
What this skill does
# Closing Issues
A `flowing` graph that turns "close GitHub issue + capture what I learned"
into a structural DAG. The synthesis text is validated upfront, the close
happens against the GitHub API, and an optional post-close callback runs
detached so the close ack is unblocked.
```python
from closing_issues import close_issue
result = close_issue(
repo="owner/repo",
number=42,
synthesis=(
"Pattern X works because of Y. Constraint: don't apply to Z. "
"Future note: revisit when feature Q lands."
),
)
print(result["issue_url"]) # https://github.com/.../issues/42
print(result["comment_url"]) # ...#issuecomment-...
```
## Why a synthesis, not a "done" comment
Closing an issue produces two artifacts:
- **The Issue itself** — implementation log. The diff and commit history
already show *what* was done.
- **The closing comment / synthesis** — what was *learned*. Lasts longer
than the diff in mental cache.
Good closing comments lead with *why*, not *what*. Failure modes,
constraints discovered, alternatives rejected. The synthesis is the
seed of an institutional memory.
## Internal shape
```
prepare_synthesis ──▶ close_github_issue [terminal]
│
└──▶ post_close_callback [detached, when=callback]
```
- **`validate=must_have_synthesis_text`** runs against the raw input
string. Empty or whitespace-only → FAILED with no GitHub API call.
This is structural: callers can't accidentally close-with-no-text.
- **`close_github_issue`** posts the synthesis as a comment, then
PATCHes the issue to `state=closed, state_reason=completed`. Returns
the issue URL and comment URL.
- **`post_close_callback`** (optional) runs detached. Caller plugs in
any extra work — store synthesis in a memory system, ping a tracker,
emit a webhook. Failure here lands in `result["detached_failures"]`
and does NOT bubble up as a close failure. Skipped via `when=` if
the callback isn't provided.
## Pluggable post-close callback
```python
def store_in_my_memory(synthesis: str, issue_url: str, repo: str, number: int):
# Whatever your memory layer is — Turso, sqlite, a JSON file, etc.
db.execute("INSERT INTO learnings (issue, synthesis) VALUES (?, ?)",
(issue_url, synthesis))
return {"stored": True}
result = close_issue(
repo="owner/repo",
number=42,
synthesis="...",
post_close_callback=store_in_my_memory,
)
if result["callback_result"] is None and result["detached_failures"]:
# The callback failed but the issue is still closed.
print("Memory store failed:", result["detached_failures"])
```
The callback receives keyword arguments: `synthesis`, `issue_url`,
`repo`, `number`. Anything it returns goes into
`result["callback_result"]`.
## Result shape
```python
{
"issue_url": "https://github.com/owner/repo/issues/N",
"comment_url": "https://github.com/.../issues/N#issuecomment-...",
"comment_id": 12345,
"callback_result": <whatever the callback returned, or None>,
"detached_failures": [], # populated if callback raised
}
```
Raises `RuntimeError` only if the GitHub close itself fails. Callback
failures are detached.
## Auth
Requires `GH_TOKEN` (or `GITHUB_TOKEN`) in the environment. Classic PAT
or fine-grained PAT with `repo` scope (specifically `issues:write`).
## When NOT to use
- Closing an issue without a synthesis. If you genuinely have nothing
to say beyond "done," just `gh issue close N` directly. This skill
is for the synthesis use case.
- Closing many issues at once (use a script that calls this in a loop —
fine, but the flow setup cost per call is small but not zero).
## See also
- `flowing` — the DAG runner this skill is built on
- `opening-prs` — the symmetric "open and merge" flow
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.