This is a personal reference workflow for minimizing token usage while maintaining project continuity across Claude Code (Sonnet 4 with file access).
Claude loads CLAUDE.md
automatically at session start.
本文由 简悦 SimpRead 转码, 原文地址 www.anthropic.com
A blog post covering tips and tricks that have proven effective for using Claude Code across various ......
We recently released Claude Code, a command line tool for agentic coding. Developed as a research project, Claude Code gives Anthropic engineers and researchers a more native way to integrate Claude into their coding workflows.
Claude Code is intentionally low-level and unopinionated, providing close to raw model access without forcing specific workflows. This design philosophy creates a flexible, customizable, scriptable, and safe power tool. While powerful, this flexibility presents a learning curve for engineers new to agentic coding tools—at least until they develop their own best practices.
# Apple Silicon laptops with firmware > 13.0 have a native charge threshold that does not required any userspace daemon running. | |
# This native limit works even when the laptop is sleeping or powered off therefore it is preferable to the userspace daemon. | |
# Nonetheless, it only works with fixed thresholds (80% as upper limit and 70% as lower limit). | |
# CHWA key is the one used to enable/disable the native limit. 01 = 80% limit, 00 = no limit | |
## | |
typeset -g smc_command="/usr/local/bin/smc" | |
typeset -g smc_charge_limit_key="CHWA" | |
typeset -g smc_charge_limit_status_on="01" | |
typeset -g smc_charge_limit_status_off="00" |
# include following in .bashrc / .bash_profile / .zshrc | |
# usage | |
# $ mkvenv myvirtualenv # creates venv under ~/.virtualenvs/ | |
# $ venv myvirtualenv # activates venv | |
# $ deactivate # deactivates venv | |
# $ rmvenv myvirtualenv # removes venv | |
export VENV_HOME="$HOME/.virtualenvs" | |
[[ -d $VENV_HOME ]] || mkdir $VENV_HOME |
# Ignore everything in the root except the "wp-content" directory. | |
/* | |
!.gitignore | |
!wp-content/ | |
# Ignore everything in the "wp-content" directory, except the "mu-plugins", "plugins", and "themes" directories. | |
wp-content/* | |
!wp-content/mu-plugins/ | |
!wp-content/plugins/ | |
!wp-content/themes/ |
*~ | |
.DS_Store | |
.svn | |
.cvs | |
*.bak | |
*.swp | |
Thumbs.db | |
# wordpress specific | |
wp-config.php |
# vim:fileencoding=utf-8:ft=conf:foldmethod=marker | |
#: Fonts {{{ | |
#: kitty has very powerful font management. You can configure | |
#: individual font faces and even specify special fonts for particular | |
#: characters. | |
font_family JetBrains Mono Medium | |
bold_font JetBrains Mono Bold |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
PASSWORD_PATH = ".password" | |
PASSWORD_ID_PATH = ".password_id" | |
# Make sure to have installed vagrant-triggers plugin | |
# > vagrant plugin install vagrant-triggers | |
# After the first `vagrant up` stop the VM and execute the following steps |
<?php | |
$serverName = "sqlserver.example.com"; | |
$database = "myDbName"; | |
$uid = 'sqlserver_username'; | |
$pwd = 'password'; | |
try { | |
$conn = new PDO( | |
"sqlsrv:server=$serverName;Database=$database", | |
$uid, |