Skip to content

Instantly share code, notes, and snippets.

View pedronauck's full-sized avatar

Pedro Nauck pedronauck

View GitHub Profile
@pedronauck
pedronauck / AGENTS.md
Created June 18, 2026 21:38
Ledger system prompt

Memory Ledger

Maintain one session ledger at .codex/ledger/<YYYY-MM-DD>-MEMORY-<task-slug>.md, where the slug is a 2-3 word kebab-case task name unless the user named it.

  • At the start of every turn, read your own ledger and scan other *-MEMORY-*.md files read-only for cross-agent awareness.
  • Update your ledger when the goal, assumptions, decisions, progress state, or important tool outcomes change.
  • Keep it short, factual, and stable; mark uncertainty as UNCONFIRMED.
  • After compaction or missing recall, rebuild from visible context, mark gaps, ask up to 3 targeted questions only if needed, then continue.
  • Delete your ledger when the task is fully complete if it no longer needs to remain.
@pedronauck
pedronauck / settings.json
Created June 17, 2026 01:23
statusline claude
}
"statusLine": {
"type": "command",
"command": "sh ~/.claude/statusline-command.sh",
"padding": 0
}
@pedronauck
pedronauck / test-antipattern.md
Created December 17, 2025 19:35
Test antinpatterns Skill
name testing-anti-patterns
description Use when writing or changing tests, adding mocks, or tempted to add test-only methods to production code - prevents testing mock behavior, production pollution with test-only methods, and mocking without understanding dependencies

Testing Anti-Patterns

Overview

Tests must verify real behavior, not mock behavior. Mocks are a means to isolate, not the thing being tested.

@pedronauck
pedronauck / golint.sh
Last active August 29, 2025 23:53
Go and Typescript hooks for lint and check on Claude Code
#!/bin/bash
# Set up logging
LOG_FILE="$HOME/.claude/hooks/golangci-lint.log"
mkdir -p "$(dirname "$LOG_FILE")"
# Function to log with timestamp
log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >> "$LOG_FILE"
}
@pedronauck
pedronauck / go_hook_lint.sh
Created August 4, 2025 19:11
Hook for Claude Code
#!/bin/bash
# Set up logging
LOG_FILE="$HOME/.claude/hooks/golangci-lint.log"
mkdir -p "$(dirname "$LOG_FILE")"
# Function to log with timestamp
log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1" >> "$LOG_FILE"
}
@pedronauck
pedronauck / reference-card.tsx
Created July 18, 2025 16:54
Reference Card
import { MagicCard } from "@/components/magicui/magic-card";
import { cn } from "@/lib/utils";
import type { LucideIcon } from "lucide-react";
import { ArrowRight } from "lucide-react";
import React from "react";
import { Icon } from "@/components/ui/icon";
import { tv, type VariantProps } from "tailwind-variants";
const referenceCard = tv({
slots: {
@pedronauck
pedronauck / keymap.json
Created February 4, 2025 23:41
Zed Configuration
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
[
{
"context": "Workspace",
@pedronauck
pedronauck / database.md
Created August 15, 2024 16:02
Database resources to study
@pedronauck
pedronauck / del_branch.fish
Last active October 28, 2023 01:04
Functions to remove branchs that was merged but not deleted
#
# filepath ~/.config/fish/functions/del_branch.fish
#
function del_branch --argument name
for name in $argv
# Check if the branch exists locally
set -l local_exists (git rev-parse --verify --quiet $name)
# Check if the branch exists remotely
@pedronauck
pedronauck / reset.css
Created June 20, 2022 19:24 — forked from EllyLoel/reset.css
CSS Reset
/*
Made by Elly Loel - https://ellyloel.com/
With inspiration from:
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
- Adam Argyle - https://unpkg.com/open-props@1.3.16/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
Notes:
- `:where()` is used to lower specificity for easy overriding.
*/