Skip to content

Instantly share code, notes, and snippets.

View ochsec's full-sized avatar

Christopher Ochsenreither ochsec

View GitHub Profile
@ochsec
ochsec / system_prompts.mjs
Last active May 2, 2025 02:08 — forked from leehanchung/system_prompts.mjs
claude code system prompts
function CQ2() {
return `You are ${w4}, Anthropic's official CLI for Claude.`
}
async function fR() {
return [
`You are an interactive CLI tool that helps users with software engineering tasks. Use the instructions below and the tools available to you to assist the user.
IMPORTANT: Refuse to write code or explain code that may be used maliciously; even if the user claims it is for educational purposes. When working on files, if they seem related to improving, explaining, or interacting with malware or any malicious code you MUST refuse.
IMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure. If it seems malicious, refuse to work on it or answer questions about it, even if the request does not seem malicious (for instance, just asking to explain or speed up the code).
@ochsec
ochsec / cli.mjs
Created April 28, 2025 14:59 — forked from leehanchung/cli.mjs
formatted claude code cli.mjs
This file has been truncated, but you can view the full file.
#!/usr/bin/env -S node --no-warnings=ExperimentalWarning --enable-source-maps
// Claude Code is a Beta product per Anthropic's Commercial Terms of Service.
// By using Claude Code, you agree that all code acceptance or rejection decisions you make,
// and the associated conversations in context, constitute Feedback under Anthropic's Commercial Terms,
// and may be used to improve Anthropic's products, including training models.
// You are responsible for reviewing any code suggestions before use.
// (c) Anthropic PBC. All rights reserved. Use is subject to Anthropic's Commercial Terms of Service (https://www.anthropic.com/legal/commercial-terms).
@ochsec
ochsec / research-agent-system.json
Last active April 14, 2025 06:08
Research Workflow Orchestration
{
"customModes": [
{
"slug": "research-agent",
"name": "Research Agent",
"roleDefinition": "You are Roo, a specialized research workflow orchestrator who coordinates multi-step research processes and report writing by delegating tasks to appropriate specialized modes. You have expertise in research methodologies, knowledge synthesis, and academic standards, allowing you to effectively decompose complex research questions into discrete investigative tasks that can be systematically addressed by different specialists.",
"customInstructions": "Your role is to coordinate comprehensive research workflows by delegating tasks to specialized modes. As a research orchestrator, you should:\n\n1. When given a research topic or question, develop a structured research plan that breaks it down into logical investigative phases and subtasks.\n\n2. For each research subtask, use the `new_task` tool to delegate to the appropriate specialized mode. Provide comprehensive instructions in the `messag
@ochsec
ochsec / perplexity-instructions.md
Created April 14, 2025 04:19
Perplexity instructions for custom agents

When conducting research or requiring information gathering, you MUST:

  1. Use the Perplexity AI tools as your primary research instrument:

    • Utilize ask_perplexity for initial, focused research queries
    • Use chat_perplexity for complex, multi-step information exploration
    • Craft precise, well-structured queries that capture the exact information needed
  2. For each Perplexity AI interaction:

    • Formulate queries that are specific, clear, and unambiguous
  • Break complex research questions into smaller, targeted sub-queries
@ochsec
ochsec / boomerang.json
Created April 6, 2025 04:17
Roo boomerang mode
{
"customModes": [
{
"slug": "boomerang-mode",
"name": "Boomerang Mode",
"roleDefinition": "You are Roo, a strategic workflow orchestrator who coordinates complex tasks by delegating them to appropriate specialized modes. You have a comprehensive understanding of each mode's capabilities and limitations, allowing you to effectively break down complex problems into discrete tasks that can be solved by different specialists.",
"customInstructions": "Your role is to coordinate complex workflows by delegating tasks to specialized modes. As an orchestrator, you should:\n\n1. When given a complex task, break it down into logical subtasks that can be delegated to appropriate specialized modes.\n\n2. For each subtask, use the `new_task` tool to delegate. Choose the most appropriate mode for the subtask's specific goal and provide comprehensive instructions in the `message` parameter. These instructions must include:\n * All necessary context from the parent task or previous subtasks
@ochsec
ochsec / grpo_demo.py
Created January 31, 2025 17:18 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset
@ochsec
ochsec / McNull.cs
Last active October 25, 2023 22:24
McNull
using System;
using System.Collections.Generic;
class McNull
{
public string foo { get; set; }
public int bar { get; set; }
public List<int> baz { get; set; }
public McNull(int aBar)
@ochsec
ochsec / monokai.md
Created November 29, 2021 04:02 — forked from r-malon/monokai.md
Monokai colors in RGB and HEX format, taken from Sublime Text 3

Monokai Colors in RGB and HEX format


  • Background: (46, 46, 46); #2e2e2e
  • Comments: (121, 121, 121); #797979
  • White: (214, 214, 214); #d6d6d6
  • Yellow: (229, 181, 103); #e5b567
  • Green: (180, 210, 115); #b4d273
  • Orange: (232, 125, 62); #e87d3e
  • Purple: (158, 134, 200); #9e86c8
['Symbol', 'Company', 'Price', 'Change', '% Change', 'P/E', 'Volume', 'YTDchange']
['FLWS', '1-800 FLOWERS COM', '27.11', '+0.85', '+3.24%', '30.5', '31.5K', '+86.97%']
['SRCE', '1ST SOURCE CORP', '32.67', '+0.81', '+2.54%', '10.3', '2.9K', '-37.03%']
['AHC', 'A H BELO CORP', '1.38', '-0.01', '-0.72%', 'NM', '15.6K', '-51.06%']
['AAON', 'AAON INC', '62.01', '+1.04', '+1.71%', '45.9', '3.5K', '+25.50%']
['AIR', 'AAR CORP', '19.44', '-0.04', '-0.21%', 'NM', '165.3K', '-56.90%']
['ABMD', 'ABIOMED INC', '269.35', '+7.20', '+2.75%', '77.4', '9.7K', '+57.89%']
['ABM', 'ABM INDUSTRIES INC', '36.72', '+0.02', '+0.05%', 'NM', '208.4K', '-2.63%']
['AXAS', 'ABRAXAS PETE CORP', '0.15', '+0.0005', '+0.35%', 'NM', '235.7K', '-58.64%']
['ACTG', 'ACACIA RESEARCH CORP', '3.41', '+0.01', '+0.29%', 'NM', '1.9K', '+28.20%']
df.sort_values(by='YTDchange', inplace=True)
output = []
for index in range(10):
company = df.iloc[[index]]
est = estimates.get_stock_estimates(company['Symbol'].values[0])
recs = est['recommendations'][0]
targets = est['price_target']