Skip to content

Instantly share code, notes, and snippets.

View ondrasek's full-sized avatar
💭
I may be slow to respond, but I respond nonetheless.

Ondrej Krajicek ondrasek

💭
I may be slow to respond, but I respond nonetheless.
View GitHub Profile
@ondrasek
ondrasek / auto-commit.ps1
Last active February 26, 2026 19:20
Claude Code auto-commit hook for PowerShell — detects dirty git state and exits 2 to instruct Claude to stage/commit/push
# Auto-commit hook: detects dirty git state and delegates to Claude via exit 2
# Follows fail-fast: detects the first problem, reports it, and exits 2.
# Claude fixes it, hook re-runs, catches the next issue, and so on.
#
# Check order (workflow sequence):
# 1. Behind remote → pull/rebase first
# 2. Untracked files → stage or gitignore
# 3. Unstaged changes → stage
# 4. Staged uncommitted → commit
# 5. Unpushed commits → push
#!/usr/bin/env bash
# Auto-commit hook: detects dirty git state and delegates to Claude via exit 2
# Follows fail-fast: detects the first problem, reports it, and exits 2.
# Claude fixes it, hook re-runs, catches the next issue, and so on.
#
# Check order (workflow sequence):
# 1. Behind remote → pull/rebase first
# 2. Untracked files → stage or gitignore
# 3. Unstaged changes → stage
# 4. Staged uncommitted → commit
@ondrasek
ondrasek / quality-gate.sh
Last active February 23, 2026 17:55
Python quality gate for Claude Code — self-updating Stop hook with 14 fail-fast checks
#!/usr/bin/env bash
# Quality gate hook for Claude Code Stop event
# Fail-fast: stops at the first failing check, outputs its full stderr/stdout.
# Exit 2 feeds stderr to Claude for automatic fixing.
#
# Repo-agnostic: scans all Python code in the repository. Each tool uses its
# own config (pyproject.toml, pyrightconfig.json, etc.) for includes/excludes.
#
# Self-updating: checks a canonical GitHub gist for newer versions using ETags.
# The .etag file is committed alongside this script as a version lock.
@ondrasek
ondrasek / statusline.sh
Last active February 23, 2026 12:41
Claude Code statusline script.
#!/usr/bin/env bash
# Claude Code status line script (bash port of PowerShell original)
# Reads JSON session data from stdin, outputs multiple lines.
# Line order is controlled by the render_* call sequence in section 17.
# --- 1. Constants ---
# oh-my-posh inspired true-color palette
C_BLUE=$'\033[38;2;0;153;255m'
C_ORANGE=$'\033[38;2;255;176;85m'
# Teal Organizations Web Research & Citation Project
<project_context>
You have access to "Reinventing Organizations" by Frederic Laloux as foundational knowledge. Your primary role is to conduct systematic web research to augment, validate, and critically evaluate the concepts in the book through finding and analyzing online sources. Every claim you make must be supported by explicit citations with confidence levels.
</project_context>
<primary_directive>
**CRITICAL**: This project requires extensive web searching. For every topic discussed, you must:
1. Search for multiple online sources (minimum 3-5 searches per topic)
2. Evaluate source credibility and recency
<task>
When user mentions newsletters or daily brief: Search their Gmail, extract text from HTML emails, summarize what's important.
</task>
<instructions>
Immediately search Gmail when requested. Use label:Subscriptions after:yesterday for "daily brief" or adjust query per user request.
Process up to 30 newsletters per request. If more exist, handle pagination with page_token and note "showing 30 of X total" in response. For each result, use read_gmail_thread to get full content. Extract whatever text you can from HTML. Group related emails by any consistent identifier.
Summarize in 2-3 paragraphs max: actions needed today, key news, and notable conflicts between sources. Write conversationally. Skip promotional content unless significant.

YouTube to Obsidian Research Note

Think step-by-step. Show reasoning before each phase. Create ONE artifact (research note only, no transcript artifact). Transform YouTube video [URL] into verified research note with rigorous source citations.

<credibility_markers> ✅ Verified - Source found, quotes match claim ⚠️ Partial - Source found but quotes differ/paywalled ❌ Unverified - Source not found or inaccessible

CÍL: Potřebuji průzkum o skupině společností Partners (www.partnersholdco.cz), trhu na kterém se pohybují, hospodářských výsledcích, konkurentech a vertikálních trzích, na kterých se pohybují. Tento průzkum mám v plánu využít pro SWOT analýzu mezinárodní expanze do Rumunska, Německa, Polska, Španělska a Itálie.
ROLE: Budeš působit ako odborník na finanční poradenství, pojišťovnictví a bankovnictví. Zaměř se na tyto oblasti, jednak na velké hráče na těchto trzích a druhak na digitální inovace a nové obchodní modely, zvláště s využitím AI a blockchain. Analýza konkurence musí zahrnovat alespoň název, hospodářské výsledky, AUM (pokud je relevantní), tržní podíl, struktura zákazníků, strategie růstu, produktové zaměření a potenciál do budoucna. Přidej vždy další relevantní informace, ikdyž nejsou explicitně uvedeny.
POSTUP: 1. Nejprve analyzuj jednotlivé společnosti Partners. Jejich seznam najdeš na www.partnersholdco.cz. 2. Identifikuj a analyzuj velké konkurenční hráče na českém trhu v jednotlivých oblastech
CÍL: Potřebuji průzkum o skupině společností Partners (www.partnersholdco.cz), trhu na kterém se pohybují, hospodářských výsledcích, konkurentech a vertikálních trzích, na kterých se pohybují. Tento průzkum mám v plánu využít pro SWOT analýzu mezinárodní expanze do Rumunska, Německa, Polska, Španělska a Itálie.
ROLE: Budeš působit ako odborník na finanční poradenství, pojišťovnictví a bankovnictví. Zaměř se na tyto oblasti, jednak na velké hráče na těchto trzích a druhak na digitální inovace a nové obchodní modely, zvláště s využitím AI a blockchain.
POSTUP: 1. Nejprve analyzuj jednotlivé společnosti Partners. Jejich seznam najdeš na www.partnersholdco.cz. 2. Identifikuj a analyzuj velké konkurenční hráče na českém trhu v jednotlivých oblastech a vertikálách. 3. Identifikuj a analyzuj inovátory, startupy, digitální produkty a nové obchodní modely v jednotlivých oblastech. Zaměř se na disruptivní inovace. 4. Vezmi tyto výsledky a zpracuj srovnávací tabulky v jednotlivých oblastech.
OČEKÁVÁNÍ: Ke všem faktům

Research Verification Protocol

Purpose: Mandatory research process for Zettelkasten notes with dynamic depth

Status: REQUIRED - Notes cannot be created without following this protocol

Core Principle

Every claim must be verified or explicitly marked as unverifiable. Research is not optional - it is the foundation of note quality. Research depth should match claim complexity.

Dynamic Research Depth