Skip to content

Instantly share code, notes, and snippets.

View DanielCardonaRojas's full-sized avatar

Daniel Cardona Rojas DanielCardonaRojas

View GitHub Profile
@DanielCardonaRojas
DanielCardonaRojas / post-checkout
Created October 25, 2025 22:34
git hook that will copy files or directories to a newly create worktrees. Designed for bare repos.
#!/bin/bash
if [[ "$1" == "0000000000000000000000000000000000000000" ]]; then
paths=(.mcp.json .claude CLAUDE.md AGENTS.md)
basepath=$(dirname $(pwd))
worktree=$(basename $(pwd))
for path in "${paths[@]}"; do
# The file or directory to copy
target="$basepath/$path"
description
Execute highest priority TaskWarrior task tagged with 'claude'

You are helping the user execute a task from TaskWarrior. Follow these steps:

Task Execution Flow

  1. Fetch uncompleted tasks tagged with 'claude':
  • Use ListMcpResourcesTool to find the TaskWarrior MCP server
description allowed-tools
Sync JIRA work items to TaskWarrior with claude tag
Bash(acli)

You are syncing JIRA work items to TaskWarrior for AI-assisted execution. Follow these steps:

Workflow

  1. Query JIRA for work items:
@DanielCardonaRojas
DanielCardonaRojas / debug-logs.md
Created October 21, 2025 17:03
Add logs that help spot the issue
description argument-hint
Insert strategic logs to spot the issue
PREFIX

Automatically insert strategic debug logs into the code based on the current context. Logs follow a hierarchical taxonomy for easy filtering.

Usage

/debugLogs {PREFIX}

@DanielCardonaRojas
DanielCardonaRojas / az-scout.md
Created October 20, 2025 20:50
Gather information about a ticket to create a plan afterwards.
description argument-hint
Fetch Azure DevOps ticket and create project directory
TICKET_ID

You are setting up a new project directory based on an Azure DevOps work item.

Task

  1. Fetch the Azure DevOps work item using the command:
@DanielCardonaRojas
DanielCardonaRojas / ticket.md
Created October 7, 2025 18:16
slash command to start working on new tickets
allowed-tools description
Bash(git log:*), Bash(git config:*), Bash(git diff:*), Bash(git branch:*), Read, Glob, Bash(git rev-parse:*), Bash(gh)
Research a ticket and create an execution plan

You are helping the user work on a specific ticket. Follow these steps:

  1. Find the ticket: The user will provide a ticket ID (e.g., "PROJ-123"). Search for folders or markdown files that start with this ticket ID in the directory: $(dirname $(git rev-parse --show-toplevel)) or git rev-parse --show-toplevel. If the directory or file is not found STOP and tell the user.

  2. Gather context: Read any files or directory contents related to this ticket to understand:

@DanielCardonaRojas
DanielCardonaRojas / pr-description.md
Created September 30, 2025 15:23
pr-description claude
allowed-tools description
Bash(git log:*), Bash(git config:*), Bash(git diff:*), Bash(git branch:*), Read, Glob
Generate a PR description from commits on the current branch

Context

  • Current branch: !git branch --show-current
  • Pull request template: find .github -type f -name "pull_request_template.md"
@DanielCardonaRojas
DanielCardonaRojas / MaxHeap.swift
Last active July 24, 2025 16:18
MaxHeap implementation
class MaxHeap {
private var array: [Int] = []
private var heapSize = 0
private func parentIndex(_ index: Int) -> Int {
(index - 1) / 2
}
private func leftChildIndex(_ index: Int) -> Int {
2 * index + 1
/// A class tracking a sequence/sets of events
public class EventCompleter<Event: OptionSet> {
/// The set tracking all inserted events
public private(set) var eventSet: Event = []
/// The target set that will notify a completion
public private(set) var targetSet: Event = []
private var continuation: CheckedContinuation<Void, Error>?
@DanielCardonaRojas
DanielCardonaRojas / ArrangedViewContainer.swift
Last active April 5, 2023 17:48
An arranged view container that allow creating all sorts of layouts even UIStackView clones.
import Foundation
import UIKit
open class ArrangedViewContainer: UIView
{
public private(set) var hiddenViews = Set<UIView>()
private var observations: Set<NSKeyValueObservation> = Set()
open private(set) var arrangedSubviews = [UIView]()
private var invalidated = false
private var viewConstraints: [NSLayoutConstraint] = []