Sonnet Political Bias Reader — Development skill for Claude Code
Uses Claude sonnet to read a csv file with political articles/studies and highlights their bias by level and explanation.
How to install Sonnet Political Bias Reader
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open RinDig/Sonnet-Political-Bias-Reader and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Sonnet Political Bias Reader does
Uses Claude sonnet to read a csv file with political articles/studies and highlights their bias by level and explanation.
Alternatives in Development
- Setup Mention Highlights — Setup Mention Highlighter Command 7.2k ★
- Explain Like Senior — Senior Developer Explanation 2.8k ★
- Portaljs Add Geo — Auto-ingest a geospatial file (GeoJSON, Shapefile, GeoPackage, KML/KMZ, FlatGeobuf, CSV-with-geometry) into a 2.3k ★
README
Political Text Bias Analyzer
This project contains a Python script that analyzes political texts for ideological bias using advanced prompt engineering and the Anthropic Claude 3.5 Sonnet API. The analysis is based on a custom prompt designed for political scientists, aiming to detect subtle and overt political leanings in textual content.
Project Overview
This script is part of my ongoing research projects in political science. It leverages custom prompt engineering to create a sophisticated system for political bias detection. The core of the analysis relies on a detailed prompt that instructs the AI to consider various aspects of political bias, including:
- Portrayal of ideological groups
- Claims about science or academia
- Research findings and worldviews
- Policy positions
- Language and framing
The AI provides a nuanced analysis, categorizing texts on a spectrum from "High Conservative" to "High Liberal," with "Neutral" options for balanced or apolitical content.
Features
- Loads data from CSV files
- Utilizes the Anthropic Claude 3.5 Sonnet API for text analysis
- Categorizes texts based on political bias
- Provides detailed explanations for each categorization
- Saves results to a new CSV file
How It Works
- The script loads article data from a CSV file.
- Each article is sent to the Anthropic API for analysis.
- The API returns a category/level of bias and a detailed explanation.
- Results are compiled into a new DataFrame and saved to a CSV file.
Usage
To use this script:
- Ensure you have the required libraries installed (pandas, anthropic).
- Replace the placeholder API key with your actual Anthropic API key.
- Prepare your input CSV file with a column containing the texts to analyze.
- Run the script, specifying your input file name and column name.
The script will process each text and save the results to a new CSV file named 'stuff_with_analysis.csv'.
Note
This project is for research purposes and demonst
Related Skills
Folio Koreader
Read your saved articles, newsletters and RSS on Kobo, PocketBook and any KOReader e-reader. Official Folio pl
Zotero Library
Zero-dependency DSH/Claude Code/Codex skill to read your local Zotero library: metadata + PDF full-text search
Arknights Skill
An Agent Skill for "Arknights," used to answer questions about agent positioning, skill mechanics, cultivation
Zh Article Analyzer Skill
Claude Code skill for deep linguistic analysis of Traditional Chinese articles—extract stylometrics, vocabular
Odoo Export
Export Odoo records (read-only) to JSON or CSV using the compat-aware export tools.
Microsoft Excel
Agent skill for Microsoft Excel for Claude Code, Cursor, Codex and other SKILL.md agents: read, edit and verif
Related Agents
Agent 05 Content
Content Agent for Vietnamese marketing content creation. Use this agent when a user wants to write blog posts,
Deep Reader
Read-only code analyst (Sonnet, medium effort). Use when the answer requires reading several files together: t
Kss Explorer
KSS explorer — sonnet, low effort, read-only. Answers one bounded question about the codebase with file:line e