There's lots of ways to round things or chamfer things. Coming from an extruded shape, a basic chamfer is pretty easy, you can do two different extrusions, one a bit shorter than your final piece and one full height, but offset
inward a bit, and then hull them together:
module shape() {
square(10, center = true);
}
hull() {
linear_extrude(8)
shape();
linear_extrude(10)
offset(delta = -2)
shape();
}
Though, because of the hull, this will only really work with fully convex shapes. Doing this for shapes with concave features is harder.